/*
 * Charleston Gray Lawn Service Website Styles
 *
 * This stylesheet defines the colour palette and layout inspired by
 * the provided logo. It balances modern web design principles with
 * a vintage flair reminiscent of classic lawn service branding.
 */

/* CSS Variables for easy theming */
:root {
  --primary-colour: #031e24; /* deep navy similar to the gentleman silhouette */
  --accent-colour: #c13f30; /* rich watermelon red */
  --secondary-colour: #3b8f3a; /* rind green */
  --background-colour: #f9f5ec; /* creamy beige backdrop */
  --text-colour: var(--primary-colour);
  --white: #ffffff;
}

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

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

/* Enable smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Navigation Bar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: var(--primary-colour);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .logo img {
  /* Make the logo even bigger to stand out */
  height: 120px;
  width: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  /* Center align navigation links vertically to accommodate a larger logo */
  align-items: center;
}

.nav-links a {
  color: var(--background-colour);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent-colour);
}

/* Hero Section */
.hero {
  background-image:
    linear-gradient(180deg, var(--accent-colour) 0%, var(--primary-colour) 100%),
    url('images/pattern.png');
  background-size: cover;
  background-position: center;
  background-blend-mode: multiply;
  color: var(--background-colour);
  text-align: center;
  padding: 5rem 2rem;
}

/* Animate hero content sliding up on page load */
@keyframes slideUp {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.hero h1 {
  animation: slideUp 0.6s ease-out forwards;
}

.hero p {
  animation: slideUp 0.8s ease-out forwards;
}

.hero .btn {
  animation: slideUp 1s ease-out forwards;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  margin-bottom: 1rem;
}

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

.btn {
  background-color: var(--secondary-colour);
  color: var(--background-colour);
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
  transition: background-color 0.3s ease;
  display: inline-block;
}

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

/* Section Containers */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.25rem;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--primary-colour);
}

/* About */
#about p {
  max-width: 750px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Services */
.service-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.service-item {
  background-color: var(--primary-colour);
  color: var(--background-colour);
  padding: 2rem;
  border-radius: 8px;
  width: 100%;
  max-width: 300px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.service-item i {
  margin-bottom: 1rem;
  color: var(--secondary-colour);
}

/* Inline SVG icons within service items inherit colour from this rule */
.service-item .service-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem auto;
  display: block;
  color: var(--secondary-colour);
}

/* Colour the SVG paths inside service icons */
.service-item .service-icon path {
  fill: var(--secondary-colour);
}

.service-item h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Contact */
form {
  max-width: 600px;
  margin: 0 auto;
  margin-top: 2rem;
}

.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 var(--primary-colour);
  border-radius: 4px;
  font-size: 1rem;
  background-color: var(--white);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* Footer */
footer {
  background-color: var(--primary-colour);
  color: var(--background-colour);
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.9rem;
}

/* Media Queries */
@media (min-width: 768px) {
  .hero h1 {
    font-size: 4rem;
  }
  .hero p {
    font-size: 1.5rem;
  }
}

/* Why Choose Us Section */
#why {
  background-color: var(--background-colour);
  padding-bottom: 2rem;
}

.why-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.why-item {
  background-color: var(--primary-colour);
  color: var(--background-colour);
  padding: 2rem;
  border-radius: 8px;
  max-width: 260px;
  text-align: center;
  flex: 1 1 230px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.why-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.why-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem auto;
  color: var(--accent-colour);
}

.why-icon path {
  fill: var(--accent-colour);
}

/* Testimonials Section */
#testimonials {
  background-color: var(--background-colour);
  padding-bottom: 2rem;
}

.testimonial-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.testimonial-item {
  background-color: var(--primary-colour);
  color: var(--background-colour);
  border-left: 4px solid var(--secondary-colour);
  padding: 1.5rem 2rem;
  border-radius: 6px;
  max-width: 300px;
  flex: 1 1 250px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.testimonial-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.testimonial-item p {
  font-style: italic;
  margin-bottom: 0.5rem;
}

.testimonial-item h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  margin-top: 0.5rem;
}

/* Back to Top Button */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--accent-colour);
  color: var(--background-colour);
  border: none;
  padding: 0.5rem 0.8rem;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
}

#backToTop:hover {
  background-color: var(--secondary-colour);
}

/* Decorative images used around the site */
.decorative-image {
  max-width: 220px;
  width: 100%;
  height: auto;
  margin: 0 auto 1.5rem auto;
  display: block;
}

/*
 * Light Pattern Background for Main
 *
 * The user requested a faint copy of the signature watermelon pattern to
 * appear behind the entire page content. We generated a lighter version of
 * the pattern image (pattern_light.png) in the `/images` directory. This
 * rule applies that image as a repeating background to the `<main>` element.
 * The pattern is subtle so it doesn’t distract from text and still lets
 * section-specific backgrounds (like solid colours on #why and
 * #testimonials) show through when defined.
 */
main {
  /*
   * Use a faint copy of the original logo as a watermark
   * behind the page content. The image `logo_light_bg.png` is
   * generated by blending the logo with white to make it very
   * subtle. Tiling it with a moderate size gives a gentle
   * pattern that doesn’t compete with the text.
   */
  background-image: url('images/logo_light_bg.png');
  /* Do not tile the logo – display one large, subtle image */
  background-repeat: no-repeat;
  /* Let the faded logo scale proportionally to fill as much of the
   * available space as possible while remaining fully visible. Using
   * `contain` ensures the entire logo is shown without cropping.
   */
  background-size: contain;
  /* Position the logo centrally near the top to act as a backdrop */
  background-position: top center;
}

/* Specific tweak for moustache image */
.moustache-image {
  max-width: 180px;
}
