/* Custom styles for the G&T CNC Brothers website */

/*
 * CSS variables
 *
 * Define a root-level custom property for the hero section background. This
 * allows site administrators to change the hero background across all pages
 * simply by updating the value of --hero-background in this file. The
 * default points to the abstract geometric pattern provided in the assets
 * folder, but it can easily be swapped for any image by replacing the
 * filename or updating the file in the assets directory.
 */
:root {
  --hero-background: url('assets/hero-bg.png');
}

/* Base styles */
body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
}

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

a {
  color: #0077b6;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Utility classes */
.icon-inline {
  width: 1rem;
  height: 1rem;
  vertical-align: middle;
  margin-right: 0.4rem;
}

/* Layout helpers */
.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Top bar */
.top-bar {
  background: #012f4a;
  color: #fff;
  padding: 0.5rem 0;
}

/* Language switcher styles */
.language-switcher {
  margin-left: 1rem;
  display: flex;
  gap: 0.25rem;
}
.language-switcher a {
  color: #fff;
  font-size: 0.85rem;
  text-decoration: none;
}
.language-switcher a:hover {
  text-decoration: underline;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
}

.contact-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
}

.contact-details span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.contact-details a {
  color: #fff;
}

.tagline {
  font-weight: 500;
}

/* Hero section */
.hero {
  /* Use the CSS variable for the hero background so it can be changed easily */
  background-image: var(--hero-background);
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  color: #fff;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

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

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

.btn-primary {
  display: inline-block;
  background: #f58634;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.3rem;
  transition: background 0.3s ease;
}

.btn-primary:hover {
  background: #cf6c1c;
}

/* Equipment section */
.equipment-section {
  padding: 4rem 0;
}

.equipment-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .equipment-grid {
    flex-direction: row;
  }
}

.equipment-image img {
  border-radius: 0.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.equipment-text {
  max-width: 600px;
}

.equipment-text h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 2rem;
}

.equipment-bullets {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.bullet {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  /* Dark background to improve contrast for white icons and text */
  background: #012f4a;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  color: #fff;
}

/* Services section */
.services-section {
  background: #f7f9fa;
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  font-weight: 700;
}

.services-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.service-card {
  background: #fff;
  border-radius: 0.5rem;
  padding: 2rem;
  flex: 1 1 260px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

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

.icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #012f4a;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.icon-circle img {
  width: 32px;
  height: 32px;
}

/*
 * Make icons white
 *
 * Many of the vector icons included in the site (both the small inline icons
 * used in the top bar and bullet lists, as well as the larger icons inside
 * the coloured circles on service cards) are drawn in solid black. When placed
 * on dark backgrounds, these icons become difficult to see. To ensure they
 * remain clearly visible, we invert their colours so the black paths render
 * white. Applying a brightness filter first forces the fill to black before
 * inversion, guaranteeing consistent results regardless of the original fill.
 */
.icon-inline,
.icon-circle img {
  filter: brightness(0) invert(1);
}

/* Do not invert bullet icons: bullet containers have light backgrounds,
   so white icons would become invisible. Reset the filter for icons
   inside bullets to use their original fill (black). */
/* Override bullet icons to white so they remain visible on the dark bullet
   background. */
.bullet .icon-inline {
  filter: brightness(0) invert(1);
}

.service-card h3 {
  margin: 0 0 0.5rem;
}

.service-card p {
  font-size: 0.9rem;
  line-height: 1.5;
}

/* About & FAQ section */
.about-section {
  padding: 4rem 0;
}

.about-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .about-grid {
    flex-direction: row;
  }
}

.about-text h2,
.faq h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 2rem;
}

.faq-item {
  margin-bottom: 1rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.5rem;
}

.faq-item input {
  display: none;
}

.faq-item label {
  font-weight: 600;
  display: block;
  cursor: pointer;
  position: relative;
  padding-right: 1.5rem;
}

.faq-item label::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 0;
  line-height: 1;
  font-weight: 700;
}

.faq-item input:checked + label::after {
  content: '–';
}

.faq-content {
  display: none;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  color: #555;
}

.faq-item input:checked ~ .faq-content {
  display: block;
}

/* Testimonials section */
.testimonials-section {
  background: #f7f9fa;
  padding: 4rem 0;
}

.testimonials-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .testimonials-grid {
    flex-direction: row;
  }
}

.testimonial {
  background: #fff;
  border-radius: 0.5rem;
  padding: 2rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  position: relative;
  flex: 1;
}

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

.quote-icon {
  width: 24px;
  height: 24px;
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  opacity: 0.6;
}

/* CTA section */
.cta-section {
  background-image: linear-gradient(45deg, #012f4a, #024f74);
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}

/* Gallery section styles */
.gallery-section {
  padding: 4rem 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.gallery-grid img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}

.gallery-note {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #666;
  text-align: center;
}

.cta-content h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.cta-content p {
  margin-bottom: 1.5rem;
}

.btn-cta {
  display: inline-block;
  background: #f58634;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.3rem;
  text-decoration: none;
  transition: background 0.3s ease;
}

.btn-cta:hover {
  background: #cf6c1c;
}

/* Service hero section */
.hero-service {
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: center;
  color: #fff;
}

.hero-service::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.hero-service .hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 2rem 1rem;
}

.hero-service .hero-inner h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero-service .hero-inner p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
}

/* Service detail section */
.service-detail {
  padding: 3rem 0;
}

.service-detail h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.feature-list li img {
  width: 20px;
  height: 20px;
}

/* Footer */
.footer-section {
  background: #012f4a;
  color: #fff;
  padding: 3rem 0 1rem;
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    flex-direction: row;
  }
}

.footer-col h4 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

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

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: #fff;
  text-decoration: none;
}

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

.footer-bottom {
  text-align: center;
  font-size: 0.8rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
}