/*
 * Base stylesheet for the ETT EDV website.
 *
 * This stylesheet implements a modern, responsive layout using CSS
 * variables, flexbox and grid. It aims to provide a clean,
 * professional look that appeals to dental and orthodontic practices.
 * Colours and spacing have been chosen to evoke trust and clarity.
 */

/* Colour palette */
:root {
  --color-primary: #0b599b; /* deep blue for headers and accents */
  --color-secondary: #00796b; /* teal for highlights */
  --color-background: #f9f9fa; /* very light grey for page background */
  --color-text: #333333; /* dark grey for body text */
  --color-white: #ffffff;
  --max-width: 1200px;
  --radius: 8px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

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

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

a:hover {
  text-decoration: underline;
}

/* Layout containers */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

header {
  background-color: var(--color-white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

/*
 * Logo styling
 *
 * Make the brand mark a little larger and align any icon and text
 * side by side. A gap is introduced so that the icon and the
 * text are visually separated. Colours are inherited from the
 * primary/secondary palette defined at the top of the file.
 */
/*
 * Logo styling
 *
 * The brand name is split into two spans to allow a dual‑tone effect
 * without relying on external icon fonts. “ETT” uses the secondary
 * colour and “EDV” uses the primary colour. This approach modernises
 * the logo while keeping it lightweight and fully self‑contained.
 */
.logo {
  display: inline-flex;
  align-items: center;
  /* Increase the overall size of the wordmark and reset the base
   * sizing on the container. Individual spans set their own
   * proportions to achieve a contemporary stacked look. */
  font-size: 0;
  font-weight: 700;
  line-height: 1;
}

/* Primary part of the wordmark (ETT). Coloured with the secondary
 * palette to stand out against the rest of the text. */
.logo .logo-text-primary {
  /* Use !important to ensure the dual‑tone colours override any
   * inherited anchor styles. Without !important, some browsers may
   * continue to apply the link colour to child spans. */
  color: var(--color-secondary) !important;
  margin-right: 0.15rem;
  font-size: 2rem;
  font-weight: 800;
}

/* Secondary part of the wordmark (EDV). Coloured with the primary
 * palette for contrast. */
.logo .logo-text-secondary {
  color: var(--color-primary) !important;
  font-size: 1.6rem;
  font-weight: 600;
}

.menu {
  display: flex;
  gap: 1rem;
}

.menu a {
  padding: 0.5rem 0.75rem;
  transition: background-color 0.2s ease;
  border-radius: var(--radius);
}

.menu a:hover {
  background-color: var(--color-secondary);
  color: var(--color-white);
}

/* Hero section */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1rem;
  /* Remove the darkening gradient on top of the hero image.  By
   * referencing only the background illustration the colours remain
   * vibrant instead of looking washed out.  To guarantee the text
   * stays readable, the `.hero-content` container applies its own
   * semi‑transparent backdrop. */
  background-image: url('../img/hero1.png');
  background-size: cover;
  background-position: center;
  color: var(--color-white);
  position: relative;
  overflow: hidden;
  /* Boost saturation and brightness of the background illustration
   * to counteract any perceived dullness. Without a gradient overlay
   * some screens may render the colours slightly muted. */
  filter: saturate(1.2) brightness(1.05);
}

.hero::after {
  /* Remove the pseudo-element overlay since the gradient is applied
   * directly via the background property on .hero. */
  content: none;
  position: static;
  top: auto;
  left: auto;
  width: 0;
  height: 0;
  background: none;
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 700px;
  /* Add a darkened panel behind the hero text to improve contrast.
   * The semi‑transparent background colour keeps the underlying
   * artwork visible while ensuring the headline and subheadings
   * remain legible against busy imagery.  A subtle shadow and
   * increased border radius modernise the look. */
  background-color: rgba(0, 0, 0, 0.55);
  padding: 2.5rem;
  border-radius: calc(var(--radius) * 1.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero h1 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  /* A light text shadow improves readability when the text sits
   * directly on top of photographic backgrounds. The subtle shadow
   * offsets the white lettering against the dark overlay. */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

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

.btn:hover {
  /* Provide a slightly darker shade for hover without using SCSS functions */
  background-color: #005f54;
}

/* Services overview */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.service-card {
  background-color: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.2s ease;
}

.service-card:hover {
  transform: translateY(-6px);
}

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

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

.service-card p {
  font-size: 0.95rem;
  color: var(--color-text);
}

/* Section headings */
.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 1.75rem;
  color: var(--color-primary);
}

.section-header p {
  font-size: 1rem;
  color: var(--color-text);
}

/* Testimonials */
.testimonials {
  /* Use a solid coloured background for the testimonials section
   * instead of a busy graphic. The primary colour ties into the
   * overall branding and provides a clean canvas for the quotes. */
  background-image: none;
  background-color: var(--color-primary);
  color: var(--color-white);
  position: relative;
  padding: 4rem 1rem;
}

/* Override colours inside the testimonials section to ensure text
 * remains readable on the solid background. The default section
 * heading styles use dark colours which would otherwise blend into
 * the blue background. */
.testimonials .section-header h2,
.testimonials .section-header p {
  color: var(--color-white);
}

.testimonials .testimonial p {
  color: var(--color-white);
}

.testimonials .testimonial cite {
  color: var(--color-secondary);
}

.testimonials::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Increase overlay opacity for testimonials section to improve
   * readability against the image background. The darker overlay
   * enhances contrast for white text.
   */
  /* Darken the overlay for testimonial section to ensure the quotes
   * remain readable over the busy background. */
  /* Use a slightly lighter overlay for testimonials to avoid making
   * the section appear overly dark or washed out while still
   * preserving readability. */
  /* Lighten the overlay in the testimonials section further so the
   * background retains much of its colour. A low opacity (0.2)
   * maintains readability while preventing the section from looking
   * overly dark. */
  /* Darken the testimonials overlay. A higher opacity ensures busy
   * background graphics (icons, diagrams) remain subtle and do not
   * interfere with the readability of the testimonial text. 0.6
   * provides a good balance between showcasing the background and
   * keeping the foreground content crisp. */
  /* No overlay needed now that the testimonials section uses a solid
   * background colour. Keeping the overlay transparent avoids
   * unnecessary darkening while still preserving the pseudo element
   * structure for potential future enhancements. */
  background: rgba(0, 0, 0, 0);
  z-index: 0;
}

.testimonials .container {
  position: relative;
  z-index: 1;
}

.testimonial {
  max-width: 700px;
  margin: 0 auto 2rem auto;
  font-style: italic;
}

.testimonial cite {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-secondary);
}

/* Footer */
footer {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 1.5rem 1rem;
  margin-top: 2rem;
}

footer .footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

footer a {
  color: var(--color-white);
  font-size: 0.9rem;
}

footer p {
  text-align: center;
  font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1.1rem;
  }
  .service-card {
    padding: 1.5rem 1rem;
  }
}