/*
  TradeConnect UK - Main Stylesheet
  This stylesheet defines the global look and feel for the TradeConnect UK
  website. The colour palette draws inspiration from professional trade
  platforms, featuring a deep blue and a warm orange as the primary
  branding colours. Layouts use modern CSS flex‑box and grid for
  responsiveness, with mobile‑first breakpoints.
*/

:root {
  --primary-color: #1E4C7A;       /* Trade blue */
  --secondary-color: #F28C28;     /* Warm orange */
  --bg-light: #F7F7F7;            /* Light grey background */
  --bg-dark: #0F2A43;             /* Darker blue for footer */
  --text-dark: #333333;           /* Primary text colour */
  --text-light: #ffffff;          /* White for contrast */
  --border-radius: 8px;
  --box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
  font-size: 16px;
  font-family: 'Arial', 'Helvetica Neue', sans-serif;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-light);
  color: var(--text-dark);
  scroll-behavior: smooth;
}

/*
  Utility classes
*/
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 0;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  background-color: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.btn:hover {
  background-color: var(--secondary-color);
  color: var(--text-light);
}

.section-heading {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  text-align: center;
  color: var(--primary-color);
}

.section-subheading {
  font-size: 1rem;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--text-dark);
}

/*
  Header & Navigation
*/
header {
  background-color: var(--primary-color);
  color: var(--text-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-light);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1rem;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.nav-links a:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/*
  Hero Section
*/
.hero {
  position: relative;
  background-image: url('../images/hero.png');
  background-size: cover;
  background-position: center;
  color: var(--text-light);
  padding: 6rem 0 8rem;
  text-align: center;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

/*
  Categories Section
*/
.categories {
  padding: 3rem 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 2rem;
  justify-items: center;
}

.category {
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1rem;
  text-align: center;
  transition: var(--transition);
  width: 100%;
  max-width: 180px;
}

.category:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.category img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.category span {
  display: block;
  font-weight: 600;
  margin-top: 0.5rem;
  color: var(--primary-color);
}

/*
  Steps Section (How it Works)
*/
.steps {
  background-color: var(--bg-light);
  padding: 3rem 0;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  justify-items: center;
}

.step {
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 2rem 1rem;
  text-align: center;
  transition: var(--transition);
}

.step:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.step-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.step-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step-desc {
  font-size: 0.95rem;
  color: var(--text-dark);
  line-height: 1.4;
}

/*
  Featured Trades & Recent Jobs
*/
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.card-content {
  padding: 1rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--primary-color);
}

.card-meta {
  font-size: 0.85rem;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.rating {
  color: #FFD700;
  font-size: 0.9rem;
}

/*
  Footer
*/
footer {
  background-color: var(--bg-dark);
  color: var(--text-light);
  padding: 2rem 0;
  margin-top: 3rem;
}

footer .footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

footer h4 {
  margin-bottom: 0.75rem;
  color: var(--secondary-color);
}

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

footer ul li {
  margin-bottom: 0.5rem;
}

footer ul li a {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
}

footer ul li a:hover {
  color: var(--secondary-color);
}

/*
  Media Queries
*/
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
}