/*
 * NB Paper website stylesheet
 *
 * Defines the colour palette, typography and layout for the NB Paper
 * marketing website. The design aims to be modern and clean while
 * reflecting the company’s focus on sustainability through its use of
 * green hues. Responsive rules ensure the site looks great on both
 * desktop and mobile devices.
 */

:root {
  /* Primary brand colours */
  --primary-color: #2b7a0b; /* deep green conveys strength and growth */
  --secondary-color: #60b815; /* lighter green for hover states */
  --text-color: #333; /* dark grey for high readability */
  --background-color: #ffffff; /* default page background */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
}

/* ---------- Navigation ---------- */

header {
  background: #fff;
  border-bottom: 3px solid var(--primary-color);
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 48px;
  width: auto;
  margin-right: 0.5rem;
}

.nav-logo span {
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--primary-color);
}

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

nav ul li {
  margin-left: 1.5rem;
}

nav ul li a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: bold;
  transition: color 0.3s ease;
}

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

/* Mobile navigation */
.nav-toggle {
  display: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .hero-content h1{
    font-size: 0.6em;
  }
  nav ul {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: center;
    border-bottom: 3px solid var(--primary-color);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
  }

  nav ul.open {
    max-height: 500px;
  }

  nav ul li {
    margin: 1rem 0;
  }

  .nav-toggle {
    display: block;
  }
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  background-image: url('images/hero-bg.png');
  background-size: cover;
  background-position: center;
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: left;
}

.hero-overlay {
  background-color: rgba(0, 0, 0, 0.5);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.hero-content {
  max-width: 800px;
  padding: 2rem;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  color: #fff;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: #dcedc8;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--primary-color);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
  cursor: pointer;
}

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

/* ---------- Features Section ---------- */
.features {
  padding: 4rem 1rem;
  background-color: #f9f9f9;
  text-align: center;
}

.features h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
}

.feature-list {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-item {
  flex: 1 1 45%;
  margin: 1rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-align: left;
}

.feature-item h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.feature-item p {
  font-size: 1rem;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .feature-item {
    flex-basis: 100%;
  }
}

/* ---------- Section containers ---------- */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.section-title {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* ---------- Products ---------- */
.products-section {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.product-item {
  flex: 1 1 45%;
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: block;
}

/* Layout for product items that include an illustration */
.product-with-image {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.product-with-image .product-image {
  max-width: 200px;
  width: 100%;
  flex: 0 0 200px;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.product-with-image > div {
  flex: 1;
}

@media (max-width: 768px) {
  .product-with-image {
    flex-direction: column;
    text-align: center;
  }
  .product-with-image .product-image {
    margin-right: 0;
    margin-bottom: 1rem;
    max-width: 100%;
  }
}

.product-item h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.product-item p {
  margin-bottom: 1rem;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .product-item {
    flex-basis: 100%;
  }
}

/* Comparison table styling */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.comparison-table th,
.comparison-table td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: left;
  font-size: 0.9rem;
}

.comparison-table th {
  background-color: #f2f2f2;
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .comparison-table,
  .comparison-table thead,
  .comparison-table tbody,
  .comparison-table th,
  .comparison-table td,
  .comparison-table tr {
    display: block;
  }
  .comparison-table tr {
    margin-bottom: 1rem;
  }
  .comparison-table td {
    padding-left: 50%;
    position: relative;
  }
  .comparison-table td::before {
    position: absolute;
    left: 0;
    top: 0;
    width: 45%;
    padding-left: 0.5rem;
    font-weight: bold;
    color: var(--primary-color);
    content: attr(data-title);
  }
  .comparison-table th {
    display: none;
  }
}

/* ---------- Forms ---------- */
.contact-form,
.job-form {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form input,
.contact-form textarea,
.job-form input,
.job-form textarea,
.job-form select {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

.contact-form button,
.job-form button {
  display: inline-block;
  background: var(--primary-color);
  color: #fff;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.contact-form button:hover,
.job-form button:hover {
  background: var(--secondary-color);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--primary-color);
  color: #fff;
  padding: 2rem 1rem;
  text-align: center;
}

.footer a {
  color: #ffffff;
  text-decoration: underline;
}

.footer p {
  margin: 0.5rem 0;
}