/*
 * Stylesheet for the Tile Company website
 *
 * This file defines the colour palette, typography and layout rules used
 * across all pages of the website. Consistent spacing, fonts and colours
 * help reinforce the brand and make the site easy to read on both
 * desktop and mobile devices.
 */

/* Colour palette */
:root {
  --primary-color: #0a3f5f;         /* deep navy used for the header and accents */
  --secondary-color: #d49b37;       /* warm golden accent used for buttons and highlights */
  --light-bg: #f5f5f5;              /* light background colour for sections */
  --dark-text: #333333;             /* dark text colour for good contrast */
  --light-text: #ffffff;            /* white text for dark backgrounds */
  --border-radius: 4px;             /* consistent rounding on cards and inputs */
}

/* Base typography and layout */
body {
  margin: 0;
  font-family: 'Montserrat', Arial, sans-serif;
  line-height: 1.6;
  color: var(--dark-text);
  background-color: var(--light-bg);
}

h1, h2, h3 {
  margin-top: 0;
  color: var(--primary-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  text-decoration: underline;
}

/* Utility container to constrain content width */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Header and navigation */
header {
  background-color: var(--primary-color);
  color: var(--light-text);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
}

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

nav a {
  color: var(--light-text);
  font-weight: 500;
  transition: opacity 0.3s ease;
}

nav a:hover {
  opacity: 0.8;
}

/* Hero section */
.hero {
  position: relative;
  background-image: url('images/hero.jpg');
  background-size: cover;
  background-position: center;
  color: var(--light-text);
  text-align: center;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  /* darken the background image for legible text */
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 2rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

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

.btn {
  display: inline-block;
  background-color: var(--secondary-color);
  color: var(--light-text);
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #b9822b; /* slightly darker on hover */
}

/* About section */
.about {
  background-color: var(--light-bg);
}

.about p {
  max-width: 800px;
  margin-bottom: 1rem;
}

/* Services section */
.services {
  background-color: #ffffff;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.service-item {
  background-color: var(--light-bg);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  text-align: center;
  transition: transform 0.3s ease;
}

.service-item:hover {
  transform: translateY(-5px);
}

.service-item img {
  border-radius: var(--border-radius);
  margin-bottom: 0.75rem;
  height: 160px;
  width: 100%;
  object-fit: cover;
}

.service-item h3 {
  margin: 0.5rem 0;
  font-size: 1.25rem;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-grid img {
  border-radius: var(--border-radius);
  width: 100%;
  height: 220px;
  object-fit: cover;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.gallery-grid img:hover {
  transform: scale(1.03);
}

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

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

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

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form button {
  background-color: var(--primary-color);
  color: var(--light-text);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: #083051;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: var(--light-text);
  padding: 1.5rem 0;
  font-size: 0.9rem;
}

footer .footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

footer h4 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

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

footer li {
  margin-bottom: 0.4rem;
}

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

footer a:hover {
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.3rem;
  }
  nav ul {
    gap: 1rem;
    flex-wrap: wrap;
  }
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .service-grid {
    gap: 1rem;
  }
  .gallery-grid {
    gap: 1rem;
  }
}
