/*
Theme Name: JHL Transport
Theme URI: https://jhltransport.co.uk
Author: Your Agency
Author URI: https://gaggo.co.uk
Description: Custom one-page WordPress theme for JHL Transport — UK haulage & logistics. Red/white branding, video hero, WhatsApp click-to-chat, fully responsive.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: jhl-transport
*/

/* ==========================================================================
   0. Design tokens
   ========================================================================== */
:root {
  --red: #C8102E;
  --red-dark: #8F0B1F;
  --red-darker: #5c0715;
  --white: #FFFFFF;
  --ink: #1B1B1B;
  --grey-light: #F4F4F4;
  --grey-mid: #6B6B6B;
  --grey-border: #E3E3E3;

  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1200px;
  --radius: 4px;
  --gap: 24px;
}

/* ==========================================================================
   1. Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 0.5em;
  letter-spacing: 0.2px;
}
h1 { font-size: clamp(2.5rem, 5vw, 4.2rem); text-transform: uppercase; }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.8rem); text-transform: uppercase; }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1em; color: var(--grey-mid); max-width: 62ch; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* Section headers */
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head p { margin-bottom: 0; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 30px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-outline-white { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline-white:hover { background: var(--white); color: var(--red-dark); }

/* ==========================================================================
   2. Header / nav
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  background: transparent;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
  padding: 18px 0;
}
.site-header.is-scrolled {
  background: var(--white);
  box-shadow: 0 2px 14px rgba(0,0,0,0.08);
  padding: 10px 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-branding { display: flex; align-items: center; gap: 12px; transition: background-color 0.25s ease, padding 0.25s ease; }
.site-branding img { max-height: 44px; width: auto; }
.site-header:not(.is-scrolled) .site-branding {
  background: rgba(255,255,255,0.92);
  padding: 6px 14px;
  border-radius: var(--radius);
}
.site-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--white);
  letter-spacing: 0.5px;
  transition: color 0.25s ease;
}
.site-header.is-scrolled .site-title,
.site-header.is-scrolled .primary-menu a { color: var(--ink); }
.site-title span { color: var(--red); }

.primary-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}
.primary-menu a {
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.site-header.is-scrolled .primary-menu a { color: var(--ink); }
.primary-menu a:hover { color: var(--red); }

.header-cta { display: flex; align-items: center; gap: 20px; }
.header-cta .btn-primary {
  padding: 9px 20px;
  font-size: 0.82rem;
  letter-spacing: 0.3px;
}
.header-phone {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; color: var(--white); white-space: nowrap;
}
.site-header.is-scrolled .header-phone { color: var(--ink); }
.header-phone svg { flex-shrink: 0; }

.menu-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 8px; width: 44px; height: 44px;
  align-items: center; justify-content: center;
}
.menu-toggle span, .menu-toggle::before, .menu-toggle::after {
  content: ""; display: block; width: 26px; height: 3px;
  background: var(--white); border-radius: 2px; transition: 0.25s ease;
}
.site-header.is-scrolled .menu-toggle span,
.site-header.is-scrolled .menu-toggle::before,
.site-header.is-scrolled .menu-toggle::after { background: var(--ink); }
.menu-toggle::before { margin-bottom: 5px; }
.menu-toggle::after { margin-top: 5px; }
.menu-toggle.is-active::before { transform: translateY(8px) rotate(45deg); }
.menu-toggle.is-active::after { transform: translateY(-8px) rotate(-45deg); }
.menu-toggle.is-active span { opacity: 0; }

@media (max-width: 900px) {
  .menu-toggle { display: flex; }
  .primary-menu {
    position: fixed;
    top: 0; right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 32px 32px;
    transition: right 0.3s ease;
    box-shadow: -8px 0 24px rgba(0,0,0,0.15);
  }
  .primary-menu.is-open { right: 0; }
  .primary-menu a { color: var(--ink) !important; font-size: 1.1rem; }
  .header-phone { display: none; }
}

/* ==========================================================================
   3. Hero (video)
   ========================================================================== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: linear-gradient(135deg, var(--red-darker), var(--ink));
  color: var(--white);
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media video, .hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,3,7,0.55) 0%, rgba(20,3,7,0.55) 40%, rgba(20,3,7,0.92) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-bottom: 130px;
  padding-top: 160px;
}
.hero-eyebrow {
  display: inline-block;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.4px;
  color: var(--white);
  background: rgba(200,16,46,0.85);
  padding: 6px 14px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.hero h1 { color: var(--white); max-width: 16ch; margin-bottom: 20px; }
.hero-sub { color: rgba(255,255,255,0.88); font-size: 1.15rem; max-width: 56ch; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Stats bar — overlaps hero bottom */
.stats-bar {
  position: relative;
  z-index: 2;
  margin-top: -80px;
  padding: 0 24px;
}
.stats-bar .container { max-width: var(--container); margin: 0 auto; padding: 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--white);
  box-shadow: 0 18px 40px rgba(0,0,0,0.15);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  padding: 32px 24px;
  border-right: 1px solid var(--grey-border);
  text-align: left;
}
.stat:last-child { border-right: none; }
.stat .num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--red);
  line-height: 1;
  display: block;
}
.stat .label { font-weight: 700; margin-top: 8px; display: block; }
.stat .desc { font-size: 0.85rem; color: var(--grey-mid); margin: 4px 0 0; }
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--grey-border); }
}
@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero-inner { padding-top: 130px; padding-bottom: 100px; }
}

/* ==========================================================================
   4. Services
   ========================================================================== */
.services { background: var(--white); padding-top: 140px; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}
.service-card {
  padding: 36px;
  border: 1px solid var(--grey-border);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  background: var(--grey-light);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.service-card:hover { border-left-color: var(--red-dark); background: #efefef; }
.service-card h3 { margin-bottom: 10px; }
.service-card p { margin-bottom: 0; }
@media (max-width: 720px) { .services-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   5. Capabilities
   ========================================================================== */
.capabilities { background: var(--ink); color: var(--white); }
.capabilities .section-head h2, .capabilities .section-head p { color: var(--white); }
.capabilities .section-head p { color: rgba(255,255,255,0.7); }
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.cap-item {
  padding: 28px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
}
.cap-item .icon {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: var(--red);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.cap-item h3 { color: var(--white); font-size: 1.15rem; }
.cap-item p { color: rgba(255,255,255,0.65); font-size: 0.92rem; margin: 0; }
@media (max-width: 900px) { .cap-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cap-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   6. Fleet / gallery strip
   ========================================================================== */
.fleet { background: var(--grey-light); }
.fleet-media {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 21/9;
  background: linear-gradient(135deg, var(--red-dark), var(--ink));
}
.fleet-media img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   7. Clients
   ========================================================================== */
.clients { background: var(--white); text-align: center; }
.clients-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 56px;
  filter: grayscale(100%);
  opacity: 0.75;
}
.clients-row img { max-height: 40px; width: auto; }
.clients-row .client-placeholder {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--grey-mid);
  border: 1px dashed var(--grey-border);
  padding: 10px 22px;
  border-radius: var(--radius);
}

/* ==========================================================================
   8. Testimonials
   ========================================================================== */
.testimonials { background: var(--grey-light); }
.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.testi-card {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  border-top: 3px solid var(--red);
}
.testi-card p { font-style: italic; color: var(--ink); }
.testi-card .author { font-weight: 700; color: var(--red); font-style: normal; margin: 0; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.3px; }
@media (max-width: 900px) { .testi-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   9. Quote form
   ========================================================================== */
.quote { background: var(--white); }
.quote-wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.quote-info ul { margin-top: 24px; }
.quote-info li {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 16px; font-weight: 600;
}
.quote-info li svg { flex-shrink: 0; margin-top: 3px; color: var(--red); }
.quote-form {
  background: var(--grey-light);
  border-radius: var(--radius);
  padding: 36px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 700; font-size: 0.85rem; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.3px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--white);
}
.form-group textarea { resize: vertical; min-height: 110px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--red); outline: none;
}
.form-note { font-size: 0.85rem; color: var(--grey-mid); margin-top: 12px; }
.form-success, .form-error {
  padding: 14px 18px; border-radius: var(--radius); margin-bottom: 18px; font-weight: 600;
}
.form-success { background: #e7f6ec; color: #1b6b3a; }
.form-error { background: #fdeceb; color: var(--red-dark); }
@media (max-width: 900px) { .quote-wrap { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* ==========================================================================
   10. Drivers (inverted red section)
   ========================================================================== */
.drivers { background: linear-gradient(120deg, var(--red-dark), var(--red)); color: var(--white); }
.drivers-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.drivers h2, .drivers p { color: var(--white); }
.drivers p { color: rgba(255,255,255,0.85); }
.drivers ul { margin: 20px 0 28px; }
.drivers li { padding-left: 26px; position: relative; margin-bottom: 10px; font-weight: 600; }
.drivers li::before {
  content: "";
  position: absolute; left: 0; top: 9px;
  width: 8px; height: 8px;
  background: var(--white);
  border-radius: 50%;
}
.drivers-card { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25); border-radius: var(--radius); padding: 32px; }
.drivers-card h3 { color: var(--white); }
@media (max-width: 900px) { .drivers-wrap { grid-template-columns: 1fr; } }

/* ==========================================================================
   11. Contact
   ========================================================================== */
.contact { background: var(--grey-light); }
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.contact-item { text-align: left; }
.contact-item .icon-circle {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--red); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.contact-item h3 { font-size: 1.05rem; margin-bottom: 6px; }
.contact-item p { margin: 0; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .contact-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   12. Footer
   ========================================================================== */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.75); padding: 56px 0 24px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand .site-title { color: var(--white); }
.footer-brand p { color: rgba(255,255,255,0.6); margin-top: 14px; }
.footer-col h4 { color: var(--white); font-family: var(--font-body); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 16px; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255,255,255,0.7); }
.footer-col a:hover { color: var(--white); }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
}
.footer-social a:hover { background: var(--red); border-color: var(--red); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 0.85rem;
}
@media (max-width: 780px) { .footer-top { grid-template-columns: 1fr; } }

/* ==========================================================================
   13. WhatsApp floating button
   ========================================================================== */
.whatsapp-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1000;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.28);
  transition: transform 0.2s ease;
}
.whatsapp-fab:hover { transform: scale(1.08); }
.whatsapp-fab svg { width: 30px; height: 30px; }
.whatsapp-fab .wa-ping {
  position: absolute; inset: 0; border-radius: 50%;
  background: #25D366; opacity: 0.6;
  animation: wa-pulse 2.4s ease-out infinite;
}
@keyframes wa-pulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.9); opacity: 0; }
}
@media (max-width: 560px) {
  .whatsapp-fab { width: 52px; height: 52px; right: 16px; bottom: 16px; }
  .whatsapp-fab svg { width: 26px; height: 26px; }
}

/* ==========================================================================
   14. Generic page / single post content (page.php, single.php)
   ========================================================================== */
.page-hero {
  background: linear-gradient(120deg, var(--red-dark), var(--ink));
  color: var(--white);
  padding: 180px 0 60px;
}
.page-hero h1 { color: var(--white); margin: 0; }
.page-content { padding: 72px 0; }
.page-content .container { max-width: 820px; }
.page-content img { border-radius: var(--radius); margin: 24px 0; }
.page-content h2 { margin-top: 1.4em; }
.page-content ul, .page-content ol { margin: 0 0 1.2em 1.4em; }
.page-content li { color: var(--grey-mid); margin-bottom: 6px; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--red); color: var(--white);
  padding: 12px 20px; z-index: 10000;
}
.skip-link:focus { left: 16px; top: 16px; }
