/* ============================================================
   Expert Witness Website — Shared Stylesheet
   Fonts: Playfair Display (headings) + Source Sans 3 (body)
   Colors: EWI navy scheme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Source+Sans+3:wght@300;400;600;700&display=swap');

/* ---- Reset & Base ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary:   #1a3a52;
    --primary-dark: #0f2a3d;
    --primary-mid:  #c5d3dc;
    --primary-light: #eef3f7;
    --accent:    #d97706;
    --accent-dark: #b45309;
    --text:      #1f2937;
    --text-muted:#6b7280;
    --border:    #d1d5db;
    --white:     #ffffff;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
    background: var(--white);
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Navigation ---- */
.navbar {
    background: var(--primary);
    color: var(--white);
    padding: 0.85rem 0;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
    display: block;
}

/* credential & resource card sub-headings (h4 inside card) */
.credential-card h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.4rem;
}

.logo p {
    font-size: 0.78rem;
    opacity: 0.85;
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.2rem;
    flex-wrap: wrap;
    align-items: center;
}

.nav-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 0.83rem;
    font-weight: 600;
    padding: 0.4rem 0.7rem;
    border-radius: 4px;
    transition: all 0.25s;
    letter-spacing: 0.01em;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
    background: rgba(255,255,255,0.12);
}

.nav-links a.active {
    color: var(--accent);
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.6rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: all 0.25s;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217,119,6,0.35);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.7);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
    border-color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-large { padding: 1rem 2.4rem; font-size: 1.05rem; }

/* ---- Hero ---- */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #2a5070 100%);
    color: var(--white);
    padding: 5.5rem 0 4.5rem;
    text-align: center;
}

.hero-content h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.hero-tagline {
    font-size: 1.15rem;
    font-weight: 600;
    opacity: 0.95;
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
}

.hero-sub {
    font-size: 1.05rem;
    opacity: 0.88;
    max-width: 640px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* ---- Stats Bar ---- */
.stats {
    background: var(--primary);
    padding: 3rem 0;
}

.stats .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.3rem;
    line-height: 1.1;
}

.stat-item p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.82rem;
}

/* ---- Section headings ---- */
.section-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.section-heading h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.section-heading p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ---- Services / Cards ---- */
.services-section {
    padding: 5rem 0;
    background: var(--white);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
}

.service-card {
    background: var(--primary-light);
    padding: 2rem;
    border-radius: 6px;
    border-left: 4px solid var(--accent);
    transition: transform 0.25s, box-shadow 0.25s;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(26,58,82,0.12);
}

.service-card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.service-card p { color: var(--text-muted); line-height: 1.75; }

/* ---- FAQ Accordion ---- */
.faq-section {
    padding: 5rem 0;
    background: var(--primary-light);
}

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

.faq-item {
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.faq-item:first-child { border-top: 1px solid var(--border); }

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    gap: 1rem;
    font-family: 'Source Sans 3', sans-serif;
}

.faq-question .faq-icon {
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--accent);
    flex-shrink: 0;
    transition: transform 0.3s;
    line-height: 1;
}

.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0;
}

.faq-answer p {
    padding: 0 0 1.25rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.faq-item.open .faq-answer { max-height: 400px; }

/* ---- CTA Band ---- */
.cta-band {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 4.5rem 0;
    text-align: center;
}

.cta-band h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.1rem;
    margin-bottom: 1rem;
}

.cta-band p {
    font-size: 1.05rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Page Header ---- */
.page-header {
    background: var(--primary);
    color: var(--white);
    padding: 3.5rem 0;
    text-align: center;
}

.page-header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.05rem;
    opacity: 0.85;
}

/* ---- Page Content ---- */
.page-content { padding: 4rem 0; }

.page-content h2 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--primary);
    font-size: 1.75rem;
    margin: 2.5rem 0 1.25rem;
}

.page-content h2:first-child { margin-top: 0; }

.page-content h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--primary);
    font-size: 1.3rem;
    margin: 1.75rem 0 0.75rem;
}

.page-content p {
    margin-bottom: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.page-content ul, .page-content ol {
    margin: 0 0 1.5rem 1.75rem;
}

.page-content li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
    color: var(--text-muted);
}

/* ---- Credentials / Cards ---- */
.credentials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.credential-card {
    background: var(--primary-light);
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid var(--accent);
}

.credential-card h3 {
    color: var(--primary);
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.credential-card p {
    color: var(--text-muted);
    font-size: 0.93rem;
    margin-bottom: 0.3rem;
    line-height: 1.5;
}

/* ---- Career Timeline ---- */
.timeline { margin: 2rem 0; position: relative; }

.timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-mid);
}

.timeline-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.timeline-dot {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: var(--accent);
    border-radius: 50%;
    margin-top: 0.2rem;
    position: relative;
    z-index: 1;
}

.timeline-content h4 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.timeline-years {
    font-size: 0.83rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
}

.timeline-content p {
    color: var(--text-muted);
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* ---- CV Download ---- */
.cv-download-box {
    background: var(--primary-light);
    border: 2px dashed var(--accent);
    border-radius: 8px;
    padding: 2.5rem;
    text-align: center;
    margin: 2rem 0;
}

.cv-download-box h3 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    margin-top: 0;
}

.cv-download-box p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.cv-highlights {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.cv-highlights span {
    background: var(--primary);
    color: var(--white);
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    font-size: 0.83rem;
    font-weight: 600;
}

/* ---- Testimonials ---- */
.testimonials-section {
    padding: 5rem 0;
    background: var(--primary-light);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 6px;
    border-left: 4px solid var(--accent);
    box-shadow: 0 2px 8px rgba(26,58,82,0.07);
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 4rem;
    color: var(--accent);
    opacity: 0.25;
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    line-height: 1;
}

.testimonial-text {
    font-style: italic;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 0.97rem;
}

.testimonial-author strong {
    display: block;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.97rem;
}

.testimonial-author span {
    color: var(--text-muted);
    font-size: 0.87rem;
}

.testimonial-case-type {
    display: inline-block;
    margin-top: 0.5rem;
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.2rem 0.7rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ---- Case Studies ---- */
.cases-section { padding: 5rem 0; }

.case-cards { display: grid; gap: 2.5rem; }

.case-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(26,58,82,0.06);
}

.case-card-header {
    background: var(--primary);
    color: var(--white);
    padding: 1.5rem 2rem;
}

.case-card-header h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    margin-bottom: 0;
    color: var(--white);
}

.case-card-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0;
}

.case-section {
    padding: 1.75rem 2rem;
    border-right: 1px solid var(--border);
}

.case-section:last-child { border-right: none; }

.case-section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 0.6rem;
    display: block;
}

.case-section p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
}

/* ---- Service Detail ---- */
.service-detail {
    background: var(--primary-light);
    border-radius: 8px;
    padding: 2.5rem;
    margin: 2rem 0;
}

.service-detail h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--primary);
    margin-bottom: 1rem;
    margin-top: 0;
}

.service-detail ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.service-detail li { color: var(--text-muted); margin-bottom: 0.4rem; }

.sample-case {
    background: var(--white);
    border-left: 4px solid var(--accent);
    padding: 1.5rem;
    border-radius: 0 6px 6px 0;
    margin-top: 1.25rem;
}

.sample-case-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 0.5rem;
    display: block;
}

.sample-case p { color: var(--text-muted); margin: 0; font-size: 0.95rem; }

/* ---- Blog ---- */
.blog-section { padding: 5rem 0; }

.blog-post-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2.5rem;
}

.blog-post-header {
    background: var(--primary);
    color: var(--white);
    padding: 1.75rem 2rem;
}

.blog-post-header h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.blog-post-meta {
    font-size: 0.83rem;
    opacity: 0.8;
}

.blog-post-body { padding: 2rem; }

.blog-post-body p { color: var(--text-muted); margin-bottom: 1rem; }

.blog-post-body h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--primary);
    margin: 1.75rem 0 0.75rem;
    font-size: 1.2rem;
}

.blog-post-body ul {
    margin: 0 0 1rem 1.5rem;
}

.blog-post-body li { color: var(--text-muted); margin-bottom: 0.4rem; }

.blog-post-cta {
    background: var(--primary-light);
    border-left: 4px solid var(--accent);
    padding: 1.5rem;
    border-radius: 0 6px 6px 0;
    margin-top: 1.5rem;
}

.blog-post-cta p { color: var(--primary); font-weight: 600; margin: 0; }

/* ---- Resources ---- */
.resources-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.resources-nav {
    background: var(--primary-light);
    border-radius: 8px;
    padding: 1.5rem 0;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.resources-nav button {
    width: 100%;
    padding: 0.9rem 1.5rem;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Source Sans 3', sans-serif;
    color: var(--text);
    font-weight: 600;
    transition: all 0.25s;
    border-left: 4px solid transparent;
}

.resources-nav button:hover { background: var(--primary-mid); color: var(--primary); }

.resources-nav button.active {
    border-left-color: var(--accent);
    color: var(--primary);
    background: rgba(197,211,220,0.4);
}

.resources-panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
}

.resource-tab { display: none; }
.resource-tab.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.resource-entry {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}

.resource-entry:last-child { border-bottom: none; }

.resource-entry h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--primary);
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
}

.resource-meta {
    font-size: 0.83rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
    display: block;
}

.resource-entry p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* ---- Contact ---- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-info h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--primary);
    margin-bottom: 1.5rem;
    margin-top: 0;
}

.contact-detail {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    align-items: flex-start;
}

.contact-detail-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.contact-detail strong { display: block; color: var(--primary); font-size: 0.83rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.2rem; }
.contact-detail a, .contact-detail p { color: var(--text-muted); text-decoration: none; font-size: 0.97rem; margin: 0; }
.contact-detail a:hover { color: var(--accent); }

.contact-form { }

.form-group { margin-bottom: 1.5rem; }

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.97rem;
    color: var(--text);
    transition: border-color 0.25s, box-shadow 0.25s;
    background: var(--white);
}

.form-group textarea { resize: vertical; min-height: 140px; }

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(217,119,6,0.12);
}

/* ---- Footer ---- */
.footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 3.5rem 0 1.5rem;
    margin-top: 5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer h4 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer p {
    opacity: 0.8;
    margin-bottom: 0.4rem;
    font-size: 0.93rem;
    line-height: 1.6;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
}

.footer a:hover { text-decoration: underline; }

.footer-nav { list-style: none; }
.footer-nav li { margin-bottom: 0.4rem; }
.footer-nav a { color: rgba(255,255,255,0.75); font-size: 0.9rem; }
.footer-nav a:hover { color: var(--accent); text-decoration: none; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ---- Utility ---- */
.highlight-box {
    background: var(--primary-light);
    border-left: 4px solid var(--accent);
    padding: 1.5rem 2rem;
    border-radius: 0 6px 6px 0;
    margin: 1.5rem 0;
}

.highlight-box h3 { color: var(--primary); margin-top: 0; margin-bottom: 0.5rem; }
.highlight-box p { color: var(--text-muted); margin: 0; }

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.section-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 3rem 0;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .resources-grid { grid-template-columns: 1fr; }
    .resources-nav { position: static; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 1rem; }
    .resources-nav button { width: auto; flex: 1 1 auto; border-left: none; border-bottom: 3px solid transparent; padding: 0.6rem 1rem; font-size: 0.83rem; }
    .resources-nav button.active { border-bottom-color: var(--accent); border-left-color: transparent; }
    .contact-grid { grid-template-columns: 1fr; }
    .two-col { grid-template-columns: 1fr; }
    .case-card-body { grid-template-columns: 1fr; }
    .case-section { border-right: none; border-bottom: 1px solid var(--border); }
    .case-section:last-child { border-bottom: none; }
}

@media (max-width: 768px) {
    .hero-content h1 { font-size: 2rem; }
    .navbar .container { flex-direction: column; gap: 0.75rem; }
    .logo { text-align: center; }
    .nav-links { justify-content: center; gap: 0; }
    .nav-links a { font-size: 0.78rem; padding: 0.35rem 0.5rem; }
    .stats .container { grid-template-columns: repeat(2, 1fr); }
    .cta-band h2 { font-size: 1.6rem; }
    .page-header h1 { font-size: 1.75rem; }
}

@media (max-width: 480px) {
    .stats .container { grid-template-columns: 1fr 1fr; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .btn { width: 100%; max-width: 280px; text-align: center; }
}
