/* =============================================
   BLENDWORTH TRAILER CENTRE - Main Stylesheet
   ============================================= */

/* --- SKIP LINK (accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--red);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Barlow', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #222;
  background: #fff;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --- CSS VARIABLES --- */
:root {
  --red: #c0392b;
  --red-dark: #922b21;
  --red-light: #f9ebea;
  --charcoal: #1a1a1a;
  --dark-grey: #2c2c2c;
  --mid-grey: #555;
  --light-grey: #f4f4f4;
  --border: #ddd;
  --white: #fff;
  --shadow: 0 2px 12px rgba(0,0,0,0.1);
  --radius: 6px;
  --transition: 0.2s ease;
}

/* --- CONTAINER --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- SECTION --- */
.section { padding: 4rem 0; }
.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--charcoal);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 0.75rem;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 48px; height: 3px;
  background: var(--red);
}

/* --- BUTTONS --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-family: 'Barlow', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  text-align: center;
  white-space: nowrap;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
  border: 2px solid var(--red);
}
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,0.15); }
.btn-outline-dark {
  background: transparent;
  color: var(--red);
  border: 2px solid var(--red);
}
.btn-outline-dark:hover { background: var(--red); color: var(--white); }

/* --- TOP BAR --- */
.topbar {
  background: var(--charcoal);
  color: #ccc;
  font-size: 0.8rem;
  padding: 0.4rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.topbar a { color: #fff; font-weight: 600; }
.topbar a:hover { color: var(--red); }

/* --- HEADER --- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  gap: 1rem;
}
.logo img { height: 56px; width: auto; }

/* --- NAV --- */
.main-nav > ul { display: flex; align-items: center; gap: 0.25rem; }
.dropdown { display: none; flex-direction: column; }
.main-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dark-grey);
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active {
  color: var(--red);
  background: var(--red-light);
}
.has-dropdown { position: relative; }
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px); left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 220px;
  z-index: 300;
  padding: 0.5rem 0;
  white-space: nowrap;
}
.dropdown li a {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  border-radius: 0;
  display: block;
}
.has-dropdown:hover > .dropdown { display: flex; }
.has-dropdown:hover > a { color: var(--red); background: var(--red-light); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: var(--transition);
}

/* --- HERO --- */
.hero {
  position: relative;
  background: var(--charcoal);
  color: var(--white);
  min-height: 480px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url('images/blendworth-trailer-centre-hampshire.jpg') center/cover no-repeat;
  opacity: 0.25;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  padding-top: 3rem;
  padding-bottom: 3rem;
}
.hero h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}
.hero h1 span { color: var(--red); }
.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 2rem;
  max-width: 480px;
}
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

/* --- USP STRIP --- */
.usp-strip {
  background: var(--red);
  color: var(--white);
  padding: 1.5rem 0;
}
.usp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.usp {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.usp-icon { font-size: 1.75rem; flex-shrink: 0; }
.usp strong { display: block; font-weight: 600; font-size: 0.95rem; }
.usp span { font-size: 0.8rem; opacity: 0.85; }

/* --- CATEGORY GRID --- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.cat-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  display: block;
  background: var(--charcoal);
  transition: transform var(--transition), box-shadow var(--transition);
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.cat-card.cat-featured {
  grid-column: span 2;
  aspect-ratio: 16/9;
}
.cat-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.75;
  transition: opacity var(--transition);
}
.cat-card:hover img { opacity: 0.6; }
.cat-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1.5rem 1rem 0.75rem;
}

/* --- BRANDS --- */
.brands { background: var(--light-grey); }
.brand-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem 3rem;
}
.brand-grid img {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: filter var(--transition), opacity var(--transition);
}
.brand-grid a:hover img { filter: grayscale(0%); opacity: 1; }

/* --- VISIT / MAP --- */
.visit { background: var(--white); }
.visit-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}
.visit-info h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--charcoal);
}
.visit-address {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--mid-grey);
}
.visit-address strong { color: var(--charcoal); }
.hours-table { width: 100%; margin-bottom: 1.5rem; border-collapse: collapse; }
.hours-table td { padding: 0.4rem 0; font-size: 0.9rem; color: var(--mid-grey); }
.hours-table td:first-child { font-weight: 500; color: var(--charcoal); padding-right: 2rem; }
.visit-contact { display: flex; gap: 1rem; flex-wrap: wrap; }
.visit-contact .btn-outline { color: var(--red); border-color: var(--red); }
.visit-contact .btn-outline:hover { background: var(--red); color: var(--white); }
.visit-contact .btn-primary { }
.visit-map iframe {
  border-radius: var(--radius);
  width: 100%;
  display: block;
}

/* --- FOOTER --- */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
}
.footer-logo { height: 48px; width: auto; margin-bottom: 1rem; }
.footer-col p { font-size: 0.875rem; line-height: 1.7; margin-bottom: 0.5rem; }
.footer-col a:hover { color: var(--white); }
.footer-col h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--white);
  margin-bottom: 1rem;
}
.footer-col ul li { margin-bottom: 0.4rem; }
.footer-col ul a { font-size: 0.875rem; transition: color var(--transition); }
.footer-col ul a:hover { color: var(--white); }
.social-links { display: flex; gap: 0.75rem; margin-top: 1rem; }
.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
  font-size: 0.95rem;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.social-links a:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1rem 0;
}
.footer-bottom p { font-size: 0.8rem; color: rgba(255,255,255,0.4); }

/* =============================================
   RESPONSIVE - TABLET (max 1024px)
   ============================================= */
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .usp-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .visit-grid { grid-template-columns: 1fr; }
  .main-nav a { padding: 0.5rem 0.5rem; font-size: 0.85rem; }
}

/* =============================================
   RESPONSIVE - MOBILE (max 768px)
   ============================================= */
@media (max-width: 768px) {

  /* Nav */
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 1rem;
    z-index: 200;
  }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; gap: 0; }
  .main-nav a { font-size: 1rem; padding: 0.75rem 0.5rem; border-bottom: 1px solid var(--light-grey); border-radius: 0; }
  .dropdown {
    position: static;
    display: flex;
    flex-direction: column;
    box-shadow: none;
    border: none;
    background: var(--light-grey);
    padding: 0;
    margin-left: 1rem;
  }
  .dropdown li a { border-bottom: 1px solid var(--border); }

  /* Hero */
  .hero { min-height: 380px; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; text-align: center; }

  /* USP */
  .usp-grid { grid-template-columns: 1fr 1fr; }
  .usp span { display: none; }

  /* Categories */
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-card.cat-featured { grid-column: span 2; }

  /* Visit */
  .visit-grid { gap: 2rem; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; }

  /* Topbar */
  .topbar span { display: none; }

  /* Section title */
  .section-title { font-size: 1.6rem; }
}

/* =============================================
   RESPONSIVE - SMALL MOBILE (max 480px)
   ============================================= */
@media (max-width: 480px) {
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .usp-grid { grid-template-columns: 1fr; }
  .brand-grid { gap: 1.5rem 2rem; }
  .hero h1 { font-size: 2rem; }
}