/* ==========================================================
   Randolph Legal Practitioners — Public Website Styles
   Colours are driven by CSS variables set inline from the
   admin-editable Settings (see includes/header.php).
   ========================================================== */
:root {
    --primary: #8a1c2b;
    --secondary: #1c2b3a;
    --bg: #ffffff;
    --bg-alt: #f7f5f2;
    --text: #23262b;
    --text-muted: #5b6068;
    --border: #e4e1db;
    --radius: 6px;
    --max-width: 1140px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Georgia', 'Times New Roman', serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
}

h1, h2, h3, h4 {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: var(--secondary);
    line-height: 1.25;
    margin: 0 0 0.6em;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Top bar ---- */
.topbar {
    background: var(--secondary);
    color: #eee;
    font-size: 13px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}
.topbar .container { display: flex; justify-content: space-between; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; gap: 6px; }
.topbar a { color: #eee; }
.topbar a:hover { color: #fff; }

/* ---- Header / nav ---- */
header.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: var(--secondary);
}
.brand img { height: 44px; width: auto; }
nav.main-nav ul {
    list-style: none;
    display: flex;
    gap: 28px;
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
}
nav.main-nav a { color: var(--text); font-weight: 500; }
nav.main-nav a.active, nav.main-nav a:hover { color: var(--primary); }
.nav-toggle-btn {
    display: none;
    background: none; border: none; font-size: 26px; cursor: pointer;
    color: var(--secondary); padding: 4px 8px; line-height: 1;
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 11px 22px;
    border-radius: var(--radius);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
}
.btn:hover { opacity: 0.9; text-decoration: none; color: #fff; }
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--secondary);
    color: var(--secondary);
}
.btn-outline:hover { background: var(--secondary); color: #fff; }

/* ---- Hero ---- */
.hero {
    background: linear-gradient(135deg, var(--secondary), #10171f);
    color: #fff;
    padding: 90px 0;
    text-align: center;
}
.hero h1 { color: #fff; font-size: 42px; max-width: 760px; margin: 0 auto 18px; }
.hero p { font-size: 18px; color: #d7dbe0; max-width: 620px; margin: 0 auto 30px; }

/* ---- Sections ---- */
section { padding: 70px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { text-align: center; margin-bottom: 46px; }
.section-title p { color: var(--text-muted); font-family: 'Helvetica Neue', Arial, sans-serif; max-width: 620px; margin: 8px auto 0; }

.grid {
    display: grid;
    gap: 30px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}
.card h3 { font-size: 19px; }
.card p { color: var(--text-muted); font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 15px; }

.service-icon {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--bg-alt);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
    color: var(--primary);
    font-weight: 700;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.team-member { text-align: center; }
.team-member .photo {
    width: 140px; height: 140px; border-radius: 50%;
    background: var(--bg-alt);
    margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; color: var(--primary);
    font-family: 'Helvetica Neue', Arial, sans-serif; font-weight: 700;
    overflow: hidden;
}
.team-member .photo img { width: 100%; height: 100%; object-fit: cover; }
.team-member h3 { margin-bottom: 2px; }
.team-member .role { color: var(--primary); font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 14px; margin-bottom: 10px; }

/* ---- Blog ---- */
.post-card { border-bottom: 1px solid var(--border); padding-bottom: 30px; margin-bottom: 30px; }
.post-meta { font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.post-body { font-size: 17px; }
.post-body p { margin-bottom: 1.2em; }

/* ---- Contact ---- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
form.stack-form label { display: block; font-family: 'Helvetica Neue', Arial, sans-serif; font-weight: 600; font-size: 14px; margin: 16px 0 6px; color: var(--secondary); }
form.stack-form label:first-child { margin-top: 0; }
form.stack-form input,
form.stack-form textarea,
form.stack-form select {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
}
form.stack-form textarea { min-height: 130px; resize: vertical; }
.info-list { list-style: none; padding: 0; font-family: 'Helvetica Neue', Arial, sans-serif; }
.info-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.info-list b { display: block; color: var(--secondary); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }

.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 14px; }
.alert-success { background: #e7f6ec; color: #1c6b37; border: 1px solid #b7e3c4; }
.alert-error { background: #fbeaea; color: #a02020; border: 1px solid #f0c2c2; }

/* ---- Footer ---- */
footer.site-footer {
    background: var(--secondary);
    color: #cfd4da;
    padding: 50px 0 24px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    margin-top: 40px;
}
footer.site-footer h4 { color: #fff; font-size: 15px; }
footer.site-footer a { color: #cfd4da; }
footer.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 34px; padding-top: 18px; text-align: center; font-size: 13px; color: #9aa1a9; }

@media (max-width: 860px) {
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .contact-grid, .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    nav.main-nav { display: none; width: 100%; order: 3; }
    nav.main-nav.open { display: block; }
    nav.main-nav ul { flex-direction: column; gap: 0; padding: 10px 0; }
    nav.main-nav li { border-top: 1px solid var(--border); }
    nav.main-nav a { display: block; padding: 12px 4px; }
    .nav-toggle-btn { display: block; }
    .hide-mobile { display: none; }
    .nav-wrap { flex-wrap: wrap; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .hero h1 { font-size: 30px; }
}
