/* ============================================================
   JT Car Repairs — stylesheet
   ============================================================ */

:root {
  --navy: #1c3f66;
  --navy-dark: #142c47;
  --navy-darker: #0f2138;
  --ink: #22344a;
  --grey-bg: #eef0f2;
  --grey-line: #d7dbe0;
  --white: #ffffff;
  --serif: Georgia, 'Times New Roman', Times, serif;
  --sans: Arial, Helvetica, sans-serif;
  --wrap: 1320px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.6;
  background: var(--white);
}

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

a {
  text-decoration: none;
  color: inherit;
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  margin: 0;
  font-weight: 700;
}

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

.site-header .wrap,
.site-footer .wrap {
  max-width: 1780px;
}

/* ---------------- Header ---------------- */

.site-header {
  border-bottom: 1px solid var(--grey-line);
  background: var(--white);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 92px;
}

.brand {
  flex: 0 0 auto;
}

.logo {
  height: 56px;
  width: auto;
}

.main-nav {
  display: flex;
  gap: 34px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .2px;
}

.main-nav a {
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  flex: 0 0 auto;
}

.actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
}

/* ---------------- Hamburger toggle ---------------- */

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  flex: 0 0 auto;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

.site-header.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.actions .icon {
  width: 18px;
  height: 18px;
}

.phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 3px;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.btn-outline {
  border: 1px solid var(--navy);
  color: var(--navy);
}

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

.btn-outline .icon {
  filter: none;
}

.btn-solid {
  background: var(--navy);
  color: var(--white);
  border: 1px solid var(--navy);
}

.btn-solid:hover {
  background: var(--navy-dark);
}

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url('../assets/uploads/hero-image.png') center / cover no-repeat;
}

.hero-inner {
  color: var(--white);
  padding: 0 20px;
}

.hero h1 {
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.25;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}

.hero .sub {
  margin-top: 22px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  letter-spacing: .3px;
}

.hero-dots {
  position: absolute;
  bottom: 26px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.hero-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
}

.hero-dots .dot.active {
  background: #3b8bd8;
}

/* ---------------- Services / Company overview ---------------- */

.services {
  background: var(--navy);
  color: var(--white);
  padding: 70px 0 90px;
  text-align: center;
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 12px;
  color: #cfd9e6;
}

.section-title {
  font-size: clamp(26px, 3.4vw, 36px);
  margin-bottom: 56px;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 320px) 1fr;
  gap: 30px;
  align-items: center;
  text-align: left;
}

.col.center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.car-top {
  width: 100%;
  max-width: 280px;
}

.col.left,
.col.right {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.service {
  display: flex;
  align-items: flex-start;
  gap: 22px;
}

.service.reverse {
  flex-direction: row-reverse;
  text-align: right;
}

.service-icon {
  width: 90px;
  height: 90px;
  flex: 0 0 auto;
  margin-top: 4px;
}

.service h3 {
  font-size: 19px;
  margin-bottom: 10px;
}

.service p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: #dbe3ee;
  max-width: 32ch;
}

.service.reverse p {
  margin-left: auto;
}

/* ---------------- Enquiry form ---------------- */

.enquiry {
  background: var(--grey-bg);
  padding: 70px 0 80px;
  text-align: center;
}

.enquiry .eyebrow {
  color: var(--navy);
}

.enquiry-form {
  max-width: 900px;
  margin: 40px auto 0;
  text-align: left;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 22px;
}

.form-field label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--ink);
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--grey-line);
  border-radius: 3px;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(28, 63, 102, .12);
}

.form-field textarea {
  resize: none;
  height: 150px;
}

.form-field.has-error input,
.form-field.has-error textarea {
  border-color: #b3261e;
}

.field-error {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #b3261e;
}

.field-error:empty {
  display: none;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.form-actions .btn {
  border: 1px solid var(--navy);
  cursor: pointer;
}

.form-actions .btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.form-status {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.form-status.success {
  color: #1c7a4d;
}

.form-status.error {
  color: #b3261e;
}

/* ---------------- Instagram ---------------- */

.instagram {
  text-align: center;
  padding: 80px 20px 60px;
}

.instagram h2 {
  font-size: 30px;
  margin-bottom: 26px;
}

.ig-handle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}

.ig-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ig-badge img {
  width: 20px;
  height: 20px;
}

.ig-photo {
  display: block;
  width: min(320px, 80%);
  aspect-ratio: 1 / 1;
  margin: 30px auto 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
}

.ig-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.ig-photo:hover img {
  transform: scale(1.05);
}

.ig-gallery {
  width: 20px;
  height: 20px;
  margin: 24px auto 0;
  opacity: .6;
}

/* ---------------- Footer ---------------- */

.site-footer {
  background: var(--grey-bg);
  border-top: 4px solid var(--navy);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr 1.2fr;
  gap: 24px;
  padding: 56px 32px 44px;
}

.footer-grid .col h4 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 18px;
  color: var(--ink);
}

.footer-grid .col ul li {
  margin-bottom: 10px;
  font-size: 14px;
  color: #4b5a6b;
}

.footer-grid .col p {
  margin: 0 0 10px;
  font-size: 14px;
  color: #4b5a6b;
}

.opening-times li {
  display: flex;
  justify-content: space-between;
  max-width: 220px;
  gap: 12px;
}

.opening-times li span:first-child {
  font-weight: 700;
  color: var(--ink);
}

.links li a:hover {
  color: var(--navy);
}

.brand-col {
  display: flex;
  align-items: flex-start;
}

.footer-logo {
  height: 50px;
}

.copyright {
  background: var(--navy-darker);
  color: #c7d1dd;
  text-align: center;
  font-size: 13px;
  padding: 16px 20px;
  letter-spacing: .3px;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 1280px) {
  .menu-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
  }

  .site-header.menu-open .wrap {
    flex-wrap: wrap;
  }

  .site-header.menu-open .main-nav {
    display: flex;
    flex-direction: column;
    flex: 0 0 100%;
    width: 100%;
    order: 5;
    gap: 0;
    padding: 12px 0 4px;
    border-top: 1px solid var(--grey-line);
  }

  .site-header.menu-open .main-nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--grey-line);
  }
}

@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .brand-col {
    grid-column: 1 / -1;
  }
}

@media (max-width: 991px) {
  .header-right {
    display: contents;
  }

  .menu-toggle {
    order: 1;
    margin-left: auto;
  }

  .actions {
    display: none;
  }

  .site-header.menu-open .actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 0 0 100%;
    width: 100%;
    order: 6;
    gap: 12px;
    padding: 16px 0 4px;
    border-top: 1px solid var(--grey-line);
  }

  .site-header.menu-open .actions .btn {
    justify-content: center;
  }
}

@media (max-width: 960px) {
  .site-header .wrap {
    flex-wrap: wrap;
    min-height: auto;
    padding: 16px 24px;
  }
  .services-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .col.left, .col.right {
    gap: 34px;
  }
  .service,
  .service.reverse {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .service p,
  .service.reverse p {
    margin: 0 auto;
  }
  .col.center {
    order: -1;
    margin-bottom: 10px;
  }
}

@media (max-width: 700px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero {
    min-height: 480px;
  }
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .opening-times li {
    max-width: none;
  }
}
