/* PropertyCerts UK — shared stylesheet for guides, articles & tools
   Mirrors the homepage design system so all pages match the brand. */

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

:root {
    --primary: #2C3E50;
    --secondary: #3498DB;
    --accent: #E67E22;
    --light-gray: #ECF0F1;
    --white: #FFFFFF;
    --text-gray: #7F8C8D;
    --border-gray: #E0E0E0;
    --success: #27AE60;
    --warning: #E67E22;
    --danger: #C0392B;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 18px;
    line-height: 1.65;
    color: var(--primary);
    overflow-x: hidden;
    background: var(--white);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* === NAVIGATION (matches homepage) === */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; height: 80px;
    background: var(--white); box-shadow: 0 2px 8px rgba(0,0,0,0.05); z-index: 1000;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { display: flex; align-items: center; text-decoration: none; gap: 12px; }
.logo-icon { width: 40px; height: 40px; flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; gap: 2px; }
.logo-main { font-size: 22px; font-weight: 700; color: var(--primary); line-height: 1; letter-spacing: -0.5px; }
.logo-main span { color: var(--accent); }
.logo-tagline { font-size: 8px; font-weight: 400; color: var(--text-gray); letter-spacing: 0.5px; text-transform: uppercase; }
.nav-menu { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav-menu a { color: var(--primary); text-decoration: none; font-size: 16px; font-weight: 500; transition: color 0.3s ease; }
.nav-menu a:hover { color: var(--secondary); }
.btn-primary {
    background: var(--accent); color: var(--white); padding: 14px 32px; border-radius: 4px;
    text-decoration: none; font-weight: 600; font-size: 16px; border: none; cursor: pointer;
    transition: all 0.3s ease; display: inline-block;
}
.btn-primary:hover { transform: scale(1.02); box-shadow: 0 6px 20px rgba(230, 126, 34, 0.3); }
.menu-toggle { display: none; flex-direction: column; cursor: pointer; gap: 5px; }
.menu-toggle span { width: 25px; height: 3px; background: var(--primary); transition: 0.3s; }

/* === ARTICLE LAYOUT === */
.article-hero {
    background: var(--primary); color: var(--white); padding: 130px 0 50px;
}
.article-hero .container { max-width: 820px; }
.breadcrumb { font-size: 14px; color: rgba(255,255,255,0.7); margin-bottom: 20px; }
.breadcrumb a { color: rgba(255,255,255,0.85); text-decoration: none; }
.breadcrumb a:hover { color: var(--white); }
.article-hero h1 { font-size: 42px; font-weight: 700; line-height: 1.2; margin-bottom: 16px; }
.article-meta { font-size: 15px; color: rgba(255,255,255,0.75); }
.article-meta strong { color: var(--white); }

.article-wrap { padding: 50px 0 80px; }
.article-wrap .container { max-width: 820px; }
.article-body { font-size: 18px; }
.article-body h2 { font-size: 30px; font-weight: 700; line-height: 1.3; margin: 44px 0 16px; padding-top: 10px; }
.article-body h3 { font-size: 22px; font-weight: 600; margin: 30px 0 12px; color: var(--primary); }
.article-body p { margin-bottom: 18px; }
.article-body ul, .article-body ol { margin: 0 0 18px 24px; }
.article-body li { margin-bottom: 10px; }
.article-body a { color: var(--secondary); text-decoration: underline; }
.article-body a.btn-primary, .article-body a.btn-cta { text-decoration: none; }
.article-body strong { color: var(--primary); }
.intro-lead { font-size: 21px; line-height: 1.6; color: var(--primary); margin-bottom: 28px; }

/* Table of contents */
.toc { background: var(--light-gray); border-radius: 8px; padding: 24px 28px; margin: 0 0 36px; }
.toc h2 { font-size: 16px; text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 12px; color: var(--text-gray); padding: 0; }
.toc ul { list-style: none; margin: 0; }
.toc li { margin-bottom: 8px; }
.toc a { color: var(--primary); text-decoration: none; font-weight: 500; }
.toc a:hover { color: var(--secondary); }

/* Callout boxes */
.callout { border-left: 4px solid var(--secondary); background: #F4F9FD; padding: 18px 22px; border-radius: 0 6px 6px 0; margin: 24px 0; }
.callout.warning { border-left-color: var(--accent); background: #FEF6EF; }
.callout.key { border-left-color: var(--success); background: #F0FAF4; }
.callout p:last-child { margin-bottom: 0; }
.callout strong { display: inline; }

/* Tables */
.cert-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 16px; }
.cert-table th, .cert-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border-gray); vertical-align: top; }
.cert-table th { background: var(--primary); color: var(--white); font-weight: 600; }
.cert-table tr:nth-child(even) td { background: var(--light-gray); }

/* CTA box (funnel to quote form) */
.cta-box {
    background: var(--primary); color: var(--white); border-radius: 10px;
    padding: 36px 40px; margin: 40px 0; text-align: center;
}
.cta-box h3 { color: var(--white); font-size: 24px; margin-bottom: 10px; }
.cta-box p { color: rgba(255,255,255,0.85); margin-bottom: 22px; }
.cta-box .btn-primary { padding: 16px 40px; font-size: 17px; }

/* Author / sources */
.author-box { display: flex; gap: 16px; align-items: flex-start; background: var(--light-gray); border-radius: 8px; padding: 22px 24px; margin: 40px 0 0; font-size: 15px; color: var(--text-gray); }
.author-box .badge { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--secondary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.author-box strong { color: var(--primary); }
.sources { font-size: 14px; color: var(--text-gray); margin-top: 28px; border-top: 1px solid var(--border-gray); padding-top: 18px; }
.sources h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.sources ul { margin-left: 18px; }
.disclaimer { font-size: 13px; color: var(--text-gray); font-style: italic; margin-top: 24px; }

/* Related links */
.related { margin-top: 50px; }
.related h2 { font-size: 24px; margin-bottom: 18px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.related-card { display: block; border: 1px solid var(--border-gray); border-radius: 8px; padding: 20px; text-decoration: none; color: var(--primary); transition: all 0.25s ease; }
.related-card:hover { border-color: var(--secondary); box-shadow: 0 6px 16px rgba(0,0,0,0.06); transform: translateY(-2px); }
.related-card span { display: block; font-size: 13px; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.related-card strong { font-size: 17px; }

/* === TOOL STYLES === */
.tool-card { background: var(--white); border: 1px solid var(--border-gray); border-radius: 12px; padding: 32px; margin: 30px 0; box-shadow: 0 4px 20px rgba(0,0,0,0.05); }
.tool-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 22px; }
.tool-field { display: flex; flex-direction: column; }
.tool-field label { font-weight: 600; margin-bottom: 8px; font-size: 15px; }
.tool-field input, .tool-field select { padding: 13px 15px; border: 2px solid var(--border-gray); border-radius: 6px; font-size: 16px; font-family: inherit; }
.tool-field input:focus, .tool-field select:focus { outline: none; border-color: var(--secondary); }
.tool-results { margin-top: 28px; }
.result-item { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 8px; margin-bottom: 12px; background: var(--light-gray); }
.result-item .r-label { font-weight: 600; }
.result-item .r-sub { font-size: 14px; color: var(--text-gray); font-weight: 400; }
.result-item .r-status { font-weight: 700; padding: 6px 14px; border-radius: 20px; font-size: 14px; white-space: nowrap; }
.status-ok { background: #D5F0E0; color: var(--success); }
.status-soon { background: #FCEEDB; color: var(--warning); }
.status-overdue { background: #F8D7D5; color: var(--danger); }
.status-na { background: var(--border-gray); color: var(--text-gray); }

/* === FOOTER (matches homepage) === */
.footer { background: var(--primary); color: var(--white); padding: 60px 0 30px; margin-top: 0; }
.footer-content { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 50px; margin-bottom: 40px; }
.footer h4 { margin-bottom: 20px; font-size: 18px; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 12px; }
.footer a { color: var(--light-gray); text-decoration: none; font-size: 14px; transition: color 0.3s ease; }
.footer a:hover { color: var(--white); }
.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.1); color: var(--light-gray); font-size: 14px; }
.footer-bottom a { color: var(--light-gray); margin: 0 12px; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    body { font-size: 16px; }
    .article-hero { padding: 110px 0 40px; }
    .article-hero h1 { font-size: 30px; }
    .article-body { font-size: 16px; }
    .article-body h2 { font-size: 25px; }
    .intro-lead { font-size: 18px; }
    .nav-menu {
        display: none; position: fixed; top: 80px; left: 0; right: 0; background: var(--white);
        flex-direction: column; padding: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); gap: 18px;
    }
    .nav-menu.active { display: flex; }
    .menu-toggle { display: flex; }
    .logo-tagline { display: none; }
    .tool-row { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; gap: 36px; }
    .cta-box, .tool-card { padding: 26px 22px; }
    .cert-table { font-size: 14px; }
    .cert-table th, .cert-table td { padding: 9px 10px; }
}
