/* ==========================================================================
   The A.C.E. Group — Main Stylesheet
   Colour palette, typography and components per the design system.
   ========================================================================== */

/* ----- Design tokens ----- */
:root {
  --color-primary: #C0021B;      /* deep red — accents, buttons, active links */
  --color-primary-darken: #9A0116; /* darker red for hover states */
  --color-dark: #1A1A1A;         /* near-black — header bg, headings */
  --color-mid: #4A4A4A;          /* body text */
  --color-light: #F5F5F5;        /* page bg, alternating sections */
  --color-white: #FFFFFF;
  --color-border: #DDDDDD;       /* borders / dividers */

  --maxw: 1100px;
  --radius: 4px;
  --shadow-card: 0 2px 6px rgba(0, 0, 0, 0.06);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-mid);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  text-decoration: underline;
}

/* ----- Typography ----- */
h1, h2, h3, h4 {
  color: var(--color-dark);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 1rem;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1rem; }

ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: 0.35rem; }

/* Red accent rule under H2 section headings */
.section-heading::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  background: var(--color-primary);
  margin-bottom: 1rem;
  margin-top: 0.5rem;
}

.section-heading.center {
  text-align: center;
}

.section-heading.center::after {
  margin-left: auto;
  margin-right: auto;
}

/* ----- Layout helpers ----- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 3.5rem 0;
}

.section--light {
  background: var(--color-light);
}

.section--dark {
  background: var(--color-dark);
  color: var(--color-light);
}

.lead {
  font-size: 1.15rem;
  color: var(--color-mid);
  max-width: 760px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 200;
}

.skip-link:focus {
  left: 0;
}

/* ----- Buttons ----- */
.btn {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
  padding: 0.75rem 1.6rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  transition: background-color 0.18s ease;
}

.btn:hover,
.btn:focus {
  background: var(--color-primary-darken);
  color: var(--color-white);
  text-decoration: none;
}

.btn--ghost {
  background: transparent;
  border: 2px solid var(--color-white);
}

.btn--ghost:hover,
.btn--ghost:focus {
  background: var(--color-white);
  color: var(--color-dark);
}

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  height: 44px;
  width: auto;
}

.brand-text {
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--color-dark);
  transition: color 0.18s ease;
}

.brand:hover .brand-text,
.brand:focus .brand-text {
  color: var(--color-primary);
}

/* Nav */
.main-nav > ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--color-dark);
  font-weight: 600;
  padding: 0.4rem 0;
  display: inline-block;
}

.main-nav a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.main-nav a[aria-current="page"] {
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
}

/* Services dropdown */
.has-dropdown {
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: none;
  font: inherit;
  font-weight: 600;
  color: var(--color-dark);
  cursor: pointer;
  padding: 0.4rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.dropdown-toggle:hover {
  color: var(--color-primary);
}

.dropdown-toggle .caret {
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 3px;
  transform: rotate(45deg);
  margin-top: -2px;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  padding: 0.5rem 0;
  margin: 0;
  list-style: none;
  display: none;
  border-radius: var(--radius);
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.dropdown.open {
  display: block;
}

.dropdown li { margin: 0; }

.dropdown a {
  display: block;
  padding: 0.5rem 1.1rem;
  border-bottom: none;
  white-space: nowrap;
}

.dropdown a:hover {
  background: var(--color-light);
  color: var(--color-primary);
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 26px;
  height: 2px;
  background: var(--color-dark);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span::before { position: absolute; top: -8px; }
.nav-toggle span::after  { position: absolute; top: 8px; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  color: var(--color-white);
  background-image: linear-gradient(rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.52)), url('../images/hero.jpg');
  background-size: cover;
  background-position: center;
  padding: 6rem 0;
}

/* Homepage hero: the branded banner shown as a full logo, with heading + CTA below.
   White background so the banner's own white background blends seamlessly. */
.hero-banner {
  background: var(--color-white);
  text-align: center;
  padding: 3rem 0 3.5rem;
  border-bottom: 1px solid var(--color-border);
}

.hero-banner-img {
  max-width: 680px;
  width: 100%;
  height: auto;
  margin: 0 auto 1.75rem;
}

.hero-banner h1 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.hero-banner p {
  max-width: 720px;
  margin: 0 auto 1.75rem;
  font-size: 1.15rem;
  color: var(--color-mid);
}

.hero .container {
  max-width: 820px;
  text-align: center;
}

.hero h1 {
  color: var(--color-white);
  font-size: 2.8rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: #f0f0f0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  border-radius: var(--radius);
}

.card h3 {
  margin-top: 0;
}

.card .card-link {
  font-weight: 600;
  display: inline-block;
  margin-top: 0.5rem;
}

.card .card-link::after {
  content: " \2192";
}

.card ul {
  margin-bottom: 1rem;
}

/* Non-linked list of extra services (chips) */
.tag-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag-list li {
  margin: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  font-weight: 600;
  color: var(--color-dark);
  box-shadow: var(--shadow-card);
}


/* Page intro band */
.page-intro {
  padding: 3rem 0 1rem;
}

.breadcrumb {
  font-size: 0.92rem;
  color: var(--color-mid);
  margin-bottom: 0.5rem;
}

.breadcrumb a { font-weight: 600; }

/* ==========================================================================
   Why choose us / feature list
   ========================================================================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.feature {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.feature .icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature .icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.feature p {
  margin: 0;
  font-size: 0.97rem;
}

/* ==========================================================================
   CTA strip
   ========================================================================== */
.cta-strip {
  background: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  padding: 3rem 0;
}

.cta-strip h2 {
  color: var(--color-white);
}

.cta-strip p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: #ffeaec;
}

.cta-strip .btn {
  background: var(--color-white);
  color: var(--color-primary);
}

.cta-strip .btn:hover,
.cta-strip .btn:focus {
  background: var(--color-dark);
  color: var(--color-white);
}

/* ==========================================================================
   Content blocks (sub-service pages)
   ========================================================================== */
.content article h2 {
  margin-top: 2rem;
}

.content-media {
  max-width: 700px;
  margin: 1.5rem auto;
  border: 1px solid var(--color-border);
  padding: 6px;
  background: #fff;
}

/* Decorative block used when no photo is provided */
.decor-block {
  background: var(--color-light);
  border-left: 4px solid var(--color-primary);
  padding: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--color-mid);
}

.banner-figure {
  text-align: center;
  margin: 2rem 0;
}

.banner-figure img {
  display: inline-block;
  max-width: 520px;
  width: 100%;
}

.subnote {
  font-size: 0.9rem;
  color: var(--color-mid);
}

/* ==========================================================================
   Rates table
   ========================================================================== */
.rates-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.rates-table th,
.rates-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid var(--color-border);
  vertical-align: top;
}

.rates-table thead th {
  background: var(--color-dark);
  color: var(--color-white);
}

.rates-table tbody tr:nth-child(even) {
  background: var(--color-light);
}

.rates-table tbody tr:nth-child(odd) {
  background: var(--color-white);
}

.table-wrap {
  overflow-x: auto;
}

/* ==========================================================================
   Contact form
   ========================================================================== */
.form-grid {
  display: grid;
  gap: 1.2rem;
  max-width: 640px;
}

.field label {
  display: block;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 0.35rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font: inherit;
  color: var(--color-mid);
  background: #fff;
}

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

.contact-details {
  background: var(--color-light);
  border-left: 4px solid var(--color-primary);
  padding: 1.5rem;
  border-radius: var(--radius);
}

.contact-details a { font-weight: 600; }

.two-col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--color-dark);
  color: #cfcfcf;
}

.site-footer a {
  color: #cfcfcf;
}

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

.footer-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 2.5rem;
  padding: 3rem 0;
}

.footer-cols h4 {
  color: var(--color-white);
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.footer-cols ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-cols li {
  margin-bottom: 0.5rem;
}

.footer-brand img {
  height: 48px;
  margin-bottom: 0.8rem;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding: 1.2rem 0;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-bottom nav a {
  margin-left: 1rem;
}

/* ==========================================================================
   Responsive — mobile-first adjustments
   ========================================================================== */
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-block;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    display: none;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav > ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.5rem 1rem;
  }

  .main-nav li {
    margin: 0;
    border-bottom: 1px solid var(--color-border);
  }

  .main-nav a,
  .dropdown-toggle {
    padding: 0.85rem 0;
    width: 100%;
  }

  .main-nav a[aria-current="page"] {
    border-bottom: none;
    text-decoration: underline;
  }

  /* Mobile dropdown: expand inline, indented */
  .has-dropdown { position: static; }

  .dropdown {
    position: static;
    display: none;
    border: none;
    box-shadow: none;
    padding: 0;
    min-width: 0;
  }

  .dropdown.open { display: block; }

  .dropdown a {
    padding-left: 1.25rem;
    color: var(--color-mid);
  }

  .two-col,
  .footer-cols {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-cols {
    gap: 2rem;
  }

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

  h1 { font-size: 2rem; }
}

@media (max-width: 480px) {
  .hero { padding: 4rem 0; }
  .hero h1 { font-size: 1.9rem; }
  .footer-bottom { flex-direction: column; }
  .footer-bottom nav a { margin-left: 0; margin-right: 1rem; }
}

/* Honeypot — keeps the field invisible to humans */
.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}