/*
 * Global stylesheet for the FixLab website.
 * Colours and layout were chosen to invert Corsair's dark aesthetic:
 * white backgrounds with black text and dark grey/blue accents.
 */

:root {
  /*
   * Primary colour palette: dark grey/blue for accents.
   * The hover colour is slightly darker to provide subtle feedback.
   */
  --primary-color: #2a2d34;    /* dark grey/blue accent */
  --primary-dark: #1f232a;    /* darker shade for hover states */
  --secondary-color: #000000; /* black text */
  --background-color: #ffffff;/* white background */
  --grey-light: #f7f7f7;      /* light grey for card backgrounds */
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--background-color);
  color: var(--secondary-color);
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Header and navigation */
header {
  background: var(--background-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo {
  height: 50px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: var(--secondary-color);
  font-weight: 600;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--primary-color);
}

/* Hero section */
#hero {
  /* Remove default grey background so the video behind can be seen */
  background: transparent;
  padding: 4rem 0 6rem;
  text-align: center;
}

#hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

#hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

/*
 * Primary call-to-action buttons use the dark accent colour for the
 * background. Override the text colour to white to maintain
 * readability against the dark background. Without this rule the
 * buttons would inherit var(--secondary-color) (black), making the
 * text illegible on dark buttons.
 */
.btn-primary {
  background: var(--primary-color);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
  display: inline-block;
  transition: background 0.3s, transform 0.3s;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Section spacing */
section {
  padding: 4rem 0;
}

h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  font-weight: 700;
}

/* Services grid */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--grey-light);
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.service-card i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.service-card h3 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
  font-weight: 600;
}

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

/* Info cards */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.info-card {
  background: var(--primary-color);
  /*
   * Use a light text colour on info cards so content remains legible
   * against the dark background. Using var(--background-color) (white)
   * provides sufficient contrast compared to black text.
   */
  color: var(--background-color);
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.info-card i {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.info-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
  font-weight: 600;
}

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

/* Contact section */
.contact-section .contact-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.contact-section form {
  flex: 1;
  min-width: 280px;
}

.contact-section .contact-info {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.contact-info p {
  margin-bottom: 0.5rem;
}

.contact-info a {
  color: var(--secondary-color);
  text-decoration: underline;
}

.contact-info a:hover {
  color: var(--primary-color);
}

/* Footer */
footer {
  background: var(--secondary-color);
  color: var(--background-color);
  padding: 1.5rem 0;
  text-align: center;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  #hero h1 {
    font-size: 2rem;
  }
  nav ul {
    gap: 1rem;
  }
  .contact-section .contact-content {
    flex-direction: column;
  }
}

/*
 * Additional custom styles
 */
/* Center the about paragraph */
#about p {
  text-align: center;
}

/* Style for the hero video: positioned behind hero text */
.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Place the video behind the hero content */
  z-index: -1;
  pointer-events: none;
  opacity: 0.4; /* adjust opacity to ensure text visibility */
}

/* Make the hero section relative and hide overflow to contain the background video */
#hero {
  position: relative;
  overflow: hidden;
  /* Override the default background so the video is visible */
  background: transparent;
}

/* Ensure the hero content sits above the video */
#hero .hero-content {
  position: relative;
  z-index: 1;
}