:root {
  --primary: #1a4d2e;
  --primary-dark: #0f3320;
  --accent: #d97706;
  --accent-dark: #b45309;
  --text: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --border: #e5e7eb;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
  padding: 0;
}

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

/* Header */
header {
  background-color: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

header .logo a {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--primary-dark);
  text-decoration: none;
}

header nav {
  display: flex;
  gap: 25px;
  align-items: center;
  flex-wrap: wrap;
}

header nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.15s ease;
}

header nav a:hover {
  color: var(--primary-dark);
}

header .cta-btn {
  background-color: var(--accent);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

header .cta-btn:hover {
  background-color: var(--accent-dark);
  transform: translateY(-1px);
}

/* Hero */
.hero {
  background-color: var(--primary-dark);
  background-image: linear-gradient(rgba(15, 51, 32, 0.45), rgba(15, 51, 32, 0.45)), url('assets/images/hero.webp');
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding: 3.5rem 2rem;
  border-radius: 10px;
  margin-top: 2rem;
  border-bottom: none;
}

.hero h1 {
  color: var(--white);
  font-size: 2.25rem;
  margin-top: 0;
}

.hero p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 65ch;
  font-size: 1.05rem;
}

.hero strong {
  color: var(--white);
}

/* Sections */
section {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

h1 {
  color: var(--primary);
  font-size: 2rem;
  margin-top: 0;
}

h2 {
  color: var(--primary);
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.15rem;
  color: var(--primary-dark);
}

/* Service list as cards */
section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

section ul li {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 1rem 1.25rem;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  border-radius: 6px;
  overflow: hidden;
}

th, td {
  padding: 0.85rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
}

tbody tr:nth-child(even) {
  background: var(--bg-light);
}

tbody tr:hover {
  background: #f0f4f1;
}

/* Blockquote */
blockquote {
  background: var(--bg-light);
  border-left: 4px solid var(--primary);
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
}

/* FAQ definition list */
dl {
  margin: 0;
}

dl dt {
  font-weight: bold;
  margin-top: 1.5rem;
  color: var(--primary-dark);
  font-size: 1.05rem;
}

dl dd {
  margin-left: 0;
  margin-bottom: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-light);
  border-radius: 6px;
}

/* Ordered list ("How It Works") */
ol {
  padding-left: 1.25rem;
}

ol li {
  margin-bottom: 0.75rem;
}

/* Footer */
footer {
  background: var(--primary-dark);
  padding: 2.5rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
}

footer p:first-child {
  margin-bottom: 1rem;
}

footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.15s ease;
}

footer a:hover {
  color: var(--white);
}

/* Responsive */
@media (max-width: 640px) {
  header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  header nav {
    gap: 14px;
    font-size: 0.9rem;
  }

  .hero {
    padding: 2rem 1.25rem;
    background-image: linear-gradient(rgba(15, 51, 32, 0.45), rgba(15, 51, 32, 0.45)), url('assets/images/hero-mobile.webp');
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  section ul {
    grid-template-columns: 1fr;
  }

  table {
    font-size: 0.85rem;
  }
}

/* ============================================
   Content-heavy inner pages (bereavement, about-us,
   services detail pages, etc.) — no .hero/table/list,
   just headings and paragraphs. Rules below key off
   structure so they apply site-wide with no HTML edits.
   ============================================ */

/* Intro section as a soft card on pages without .hero */
main > section:first-of-type:not(.hero) {
  background: var(--bg-light);
  border-radius: 10px;
  padding: 2rem 2rem 1.75rem;
  margin-top: 1.5rem;
  border-bottom: none;
}

/* Lede paragraph directly under the H1 */
main > section:first-of-type:not(.hero) > h1 + p {
  font-size: 1.1rem;
  color: var(--text);
}

/* Readable line length for body copy */
section > p {
  max-width: 70ch;
}

/* "Call us" style callouts — any paragraph that's just a <strong> */
p:has(> strong:only-child) {
  background: #fff7ed;
  border-left: 4px solid var(--accent);
  padding: 0.9rem 1.25rem;
  border-radius: 0 6px 6px 0;
  font-size: 1.05rem;
  max-width: 70ch;
}

/* Subheading accent marker */
h3 {
  position: relative;
  padding-left: 1rem;
  margin-top: 1.75rem;
}

h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 4px;
  height: 1em;
  background: var(--accent);
  border-radius: 2px;
}

/* Hero contact form + big CTA */
.hero-content {
  max-width: 480px;
}

.hero form.quote-form {
  margin: 1.5rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hero .form-group label {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.hero .form-group input,
.hero .form-group textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
}

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

.hero .cta-btn {
  background-color: var(--accent);
  color: var(--white);
  text-decoration: none;
  font-weight: bold;
  border-radius: 6px;
  font-size: 1.05rem;
  padding: 12px 24px;
  border: none;
  cursor: pointer;
  width: fit-content;
  display: inline-block;
}

.hero .cta-btn:hover {
  background-color: var(--accent-dark);
}

.hero .cta-btn-call {
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .hero-content {
    max-width: 100%;
  }
}

/* Based in Plymouth tagline, added under hero H1 */
.based-in-plymouth {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0 0 1rem 0;
}
