/* ISO 9000 Resources — modern stylesheet
   Maps to the existing #header / #topnav / #crumbs / #content / #sidebar /
   .post / .post-content / #footer markup used across every page, so it
   restyles the whole site without HTML changes.
*/

:root {
    --color-primary:        #0F4C81;
    --color-primary-dark:   #0a3a63;
    --color-accent:         #f0a500;
    --color-accent-dark:    #c98700;
    --color-text:           #1f2937;
    --color-heading:        #111827;
    --color-muted:          #6b7280;
    --color-border:         #e5e7eb;
    --color-bg:             #f9fafb;
    --color-card:           #ffffff;
    --color-link:           #0F4C81;
    --color-link-hover:     #c98700;
    --radius:               8px;
    --shadow-sm:            0 1px 2px rgba(15,23,42,.05);
    --shadow-md:            0 4px 12px rgba(15,23,42,.08);
    --max-width:            1200px;
    --font-stack:           -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    font-family: var(--font-stack);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; }

a { color: var(--color-link); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--color-link-hover); text-decoration: underline; }

p { margin: 0 0 1em; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-stack);
    font-weight: 600;
    color: var(--color-heading);
    margin: 1.5em 0 .6em;
    line-height: 1.3;
    letter-spacing: -0.01em;
}
h1 { font-size: 2rem;    margin-top: 0; }
h2 { font-size: 1.5rem;  }
h3 { font-size: 1.2rem;  }
h4 { font-size: 1.05rem; }

hr  { border: 0; border-top: 1px solid var(--color-border); margin: 2.5rem 0; }
del { color: var(--color-muted); }

input, textarea, select, button { font-family: inherit; font-size: 1rem; }

/* ---------- Outer wrapper ---------- */
#rap {
    max-width: var(--max-width);
    margin: 0 auto;
    background: transparent;
    padding: 0;
}

/* ---------- Header ---------- */
#header {
    background: var(--color-card);
    border-bottom: 1px solid var(--color-border);
    padding: 1.25rem 2rem 1rem;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 2rem;
    row-gap: .25rem;
    align-items: center;
    box-shadow: var(--shadow-sm);
}
#header h1 {
    grid-column: 1; grid-row: 1;
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -.01em;
}
#header h1 a {
    color: var(--color-primary);
    text-decoration: none;
}
#header h1 a:hover { color: var(--color-primary-dark); }

#header #desc {
    grid-column: 1; grid-row: 2;
    font-size: .95rem;
    color: var(--color-muted);
    font-style: normal;
    margin: 0;
}

#header #topnav {
    grid-column: 2; grid-row: 1 / span 2;
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.4rem;
    align-items: center;
}
#header #topnav li {
    display: inline-block;
    font-weight: 500;
}
#header #topnav li a {
    color: var(--color-text);
    text-decoration: none;
    font-size: .95rem;
    padding: .35rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color .15s ease, color .15s ease;
}
#header #topnav li a:hover {
    color: var(--color-primary);
    border-bottom-color: var(--color-accent);
}

/* ---------- Breadcrumbs / slogan bar ---------- */
#crumbs {
    background: var(--color-primary);
    color: rgba(255,255,255,.95);
    padding: .65rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: .85rem;
}
#breadcrumbs {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}
#breadcrumbs li {
    display: inline;
    font-weight: 500;
}
#breadcrumbs li:empty { display: none; }
#breadcrumbs li a {
    color: rgba(255,255,255,.95);
    text-decoration: none;
}
#breadcrumbs li a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}
#breadcrumbs li + li:not(:empty)::before {
    content: " / ";
    color: rgba(255,255,255,.5);
    margin-right: .35rem;
}
#slogan {
    margin: 0;
    color: rgba(255,255,255,.85);
    font-style: italic;
}

/* ---------- Main two-column layout ---------- */
#main {
    max-width: var(--max-width);
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 2.5rem;
    align-items: start;
}
#content {
    min-width: 0;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2rem 2.25rem;
    box-shadow: var(--shadow-sm);
}

/* ---------- Article block ---------- */
.post { margin-bottom: 2.5rem; }
.post-info { color: var(--color-muted); font-size: .9rem; }
/* The legacy template wrapped <h2> inside <h2 class="post-title"> — we
   neutralize the inner element so both produce one clean heading. */
.post-info h2,
.post-title h2 { all: unset; display: contents; }
.post-title {
    font-size: 1.85rem;
    margin: 0 0 1.25rem;
    color: var(--color-heading);
    line-height: 1.2;
    font-weight: 700;
}
.post-content { color: var(--color-text); font-size: 1rem; }
.post-content p { margin: 0 0 1rem; }
.post-content ul, .post-content ol { margin: 0 0 1rem; padding-left: 1.5rem; }
.post-content ul li, .post-content ol li { margin: .3rem 0; }
.post-content strong { color: var(--color-heading); }
.post-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background: #f3f4f6;
    border-left: 3px solid var(--color-accent);
    color: #374151;
    font-style: italic;
}
.post-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5rem 0;
    background: var(--color-card);
}
.post-content table th, .post-content table td {
    border: 1px solid var(--color-border);
    padding: .65rem .85rem;
    text-align: left;
    vertical-align: top;
}
.post-content table th {
    background: #f3f4f6;
    font-weight: 600;
    color: var(--color-heading);
}
.post-content hr { margin: 2rem 0; }
.post-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

/* ---------- Sidebar ---------- */
#sidebar { min-width: 0; }
#sidebar h2 {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--color-primary);
    margin: 1.5rem 0 .5rem;
    padding-bottom: .4rem;
    border-bottom: 2px solid var(--color-accent);
    font-weight: 700;
}
#sidebar h2:first-child { margin-top: 0; }
#sidebar ul {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    font-weight: normal;
}
#sidebar ul li {
    margin: 0; padding: 0;
    border-bottom: 1px solid var(--color-border);
}
#sidebar ul li:last-child { border-bottom: 0; }
#sidebar ul li a {
    display: block;
    padding: .55rem .9rem;
    color: var(--color-text);
    text-decoration: none;
    font-size: .92rem;
    font-weight: 500;
    transition: background .15s ease, color .15s ease;
}
#sidebar ul li a:hover {
    background: #f3f4f6;
    color: var(--color-primary);
    text-decoration: none;
}

/* ---------- Pricing cards (homepage product grid) ---------- */
.pricing {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin: 1.75rem 0 2rem;
}
.pricing-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    text-align: center;
    transition: transform .15s ease, box-shadow .15s ease;
    position: relative;
}
.pricing-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.pricing-card.featured {
    border: 2px solid var(--color-accent);
    box-shadow: var(--shadow-md);
}
.pricing-card.featured::before {
    content: "Best Value";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: .2rem .8rem;
    border-radius: 999px;
    letter-spacing: .07em;
    white-space: nowrap;
}
.pricing-card h3 {
    margin: 0 0 .75rem;
    font-size: 1.1rem;
    color: var(--color-primary);
}
.pricing-card h3 a { color: inherit; text-decoration: none; }
.pricing-card h3 a:hover { color: var(--color-primary-dark); text-decoration: underline; }
.pricing-card p {
    font-size: .92rem;
    color: var(--color-muted);
    flex: 1;
    margin: 0 0 1rem;
}
.pricing-card .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin: .5rem 0 1rem;
}
.pricing-card .price del {
    font-size: 1rem;
    color: var(--color-muted);
    font-weight: 400;
    margin-right: .5rem;
}
.pricing-card form { margin: 0; }

/* ---------- Step list (homepage 17-step plan) ---------- */
.steps {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0;
    counter-reset: step;
}
.step {
    background: var(--color-bg);
    border-left: 3px solid var(--color-primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1rem 1.25rem 1rem 3.5rem;
    position: relative;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 1rem;
    top: 1rem;
    width: 1.75rem; height: 1.75rem;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    font-size: .85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.step h4 {
    margin: 0 0 .35rem;
    color: var(--color-primary);
    font-size: 1.05rem;
    font-weight: 700;
}
.step p { margin: 0; font-size: .95rem; }

/* ---------- Hero callout ---------- */
.callout {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    margin: 1.5rem 0 2rem;
    text-align: center;
    font-size: 1rem;
}
.callout strong { color: #fff; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    border: 0;
    padding: .65rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, transform .1s ease;
}
.btn:hover {
    background: var(--color-primary-dark);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}
.btn-accent { background: var(--color-accent); }
.btn-accent:hover { background: var(--color-accent-dark); }

/* ---------- Footer ---------- */
#footer {
    max-width: var(--max-width);
    margin: 3rem auto 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-muted);
    font-size: .85rem;
    text-align: center;
}
#footer p { margin: 0 0 .75rem; }
#footer a { color: var(--color-text); font-weight: 500; margin: 0 .25rem; }
#footer a:hover { color: var(--color-primary); }
#footer table { border: 0; margin: 1rem auto 0; }
#footer img { display: inline-block; opacity: .55; margin: 0 .5rem; }

/* ---------- Legacy photo helpers ---------- */
.right-photo { float: right; margin: 0 0 1rem 1.5rem; max-width: 40%; }
.left-photo  { float: left;  margin: 0 1.5rem 1rem 0; max-width: 40%; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
    #header {
        grid-template-columns: 1fr;
        padding: 1rem 1.25rem;
    }
    #header h1 { font-size: 1.4rem; }
    #header #topnav {
        grid-row: auto;
        grid-column: 1;
        margin-top: .5rem;
        gap: .75rem 1rem;
    }
    #crumbs {
        padding: .65rem 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: .35rem;
    }
    #main {
        grid-template-columns: 1fr;
        padding: 0 1.25rem;
        margin: 1.5rem auto;
        gap: 2rem;
    }
    #content { padding: 1.5rem 1.25rem; }
    .post-title { font-size: 1.5rem; }
    .pricing { grid-template-columns: 1fr; }
    #footer { padding: 1.25rem; }
}

@media (max-width: 540px) {
    .step { padding-left: 2.75rem; }
    .step::before { left: .5rem; }
}
