/*
 * Global styles for the Cerâmica Gi website
 *
 * The palette now draws directly from the company logo. The dominant red
 * serves as the primary accent colour throughout the navigation bar,
 * buttons and headings. A dark grey is used for body text to ensure good
 * contrast, while off‑white backgrounds provide a clean canvas.
 */

/* Colour palette using CSS custom properties */
:root {
  --primary: #b11a18;       /* main red pulled from the logo */
  --primary-dark: #7e0c11;  /* darker shade for hover states */
  --text: #333333;          /* dark grey for general text */
  --background: #fafafa;    /* light neutral background */
  --footer-bg: #212121;     /* very dark background for footer */
  --footer-text: #ffffff;   /* white text for footer */
}

/* Base element defaults */
* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3 {
  margin-top: 0;
}

/* Navigation bar */
nav {
  background-color: var(--primary);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 24px;
  font-weight: bold;
}

nav .logo img {
  height: 40px;
  width: auto;
  background-color: #fff; /* white backdrop so the red logotype stands out on the red bar */
  padding: 4px;
  border-radius: 4px;
}

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

nav ul li a {
  color: #fff;
  font-weight: bold;
  transition: color 0.2s ease-in-out, opacity 0.2s ease-in-out;
}

nav ul li a:hover {
  color: #f5eaea;
  opacity: 0.9;
}

/* Container utility class */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

/* Hero section on the home page */
.hero {
  position: relative;
  color: #ffffff;
  height: 360px;
  background-image: url('hero.png');
  background-size: cover;
  /* Reposition background image so that the truck's rodas (wheels) align with the bottom edge of the hero section.
     A vertical offset of ~75% brings the truck into view without cutting off the wheels. */
  /* Further adjust vertical position for a balanced view where the truck's
     rodas align with the bottom border of the hero section. 80% is a mid‑point
     between center and bottom. */
  background-position: center 80%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero h1 {
  font-size: 42px;
  margin-bottom: 10px;
  padding: 8px 16px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}

.hero p {
  max-width: 600px;
  font-size: 18px;
  line-height: 1.4;
  padding: 8px 16px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}

/* Section spacing */
section {
  padding: 40px 0;
}

/* Product grid for the catalogue page */
.product-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.product-card {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
}

.product-card img {
  width: 100%;
  height: 220px; /* Increase image height for product cards */
  object-fit: cover;
  display: block;
}

.product-card .card-content {
  padding: 16px;
  text-align: center;
}

.product-card h3 {
  margin-bottom: 8px;
  color: var(--primary);
}

.product-card p {
  margin: 0;
  color: #555;
  font-size: 14px;
}

/* Contact form */
.contact-info {
  margin-bottom: 24px;
}

.contact-info p {
  margin: 6px 0;
}

.contact-form {
  max-width: 500px;
}

.contact-form label {
  display: block;
  margin-bottom: 4px;
  font-weight: bold;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.contact-form button {
  background-color: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.contact-form button:hover {
  background-color: var(--primary-dark);
}

/* Highlight boxes for company differentials */
/* Redefined highlights layout to show items in a two‑column grid */
.highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.highlight-item {
  background-color: #f5f5f5;
  border-radius: 6px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.highlight-item h3 {
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--primary);
}

/* Footer */
footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 20px 0;
  text-align: center;
  font-size: 14px;
}