/* Root Variables */
:root {
  --main-bg: #131f47; /* Very dark blue for main background */
  --section-bg: #333333; /* Dark gray for header, nav, sections, footer */
  --primary-text: #ffffff; /* White for text */
  --accent-blue: #4a6cd4; /* Light blue for headings */
  --cta-green: #01c430; /* Green for buttons/hovers */
}

/* Reset and General Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 18px;
}

body {
  background: var(--main-bg);
  color: var(--primary-text);
  line-height: 1.6;
  font-family: "Roboto", sans-serif;
}

/* General Link Styles */
a {
  color: var(--primary-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

nav a {
  color: var(--primary-text);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: color 0.3s ease;
}

.about-us a {
  border: 2px solid var(--primary-text);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: inline-block;
  transition: border-color 0.3s ease;
}

a:hover {
  color: var(--cta-green);
}

/* Header and Nav Container */
.header-nav-container {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 10;
  transition: transform 0.3s ease;
}

.header-nav-container.hidden {
  transform: translateY(-100%);
}

/* Header */
header {
  background: var(--section-bg);
  padding: 20px 40px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.container1 {
  max-width: 50%;
  padding: 2%;
}

/* Company Header */
.company-header {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between; /* Base layout */
}

.main-logo {
  width: 120px;
  flex-shrink: 0; /* Prevent logo from shrinking */
}

.main-logo img {
  width: 100%;
  height: auto;
  display: block;
}

.company-name {
  flex-grow: 1; /* Allow company name to take available space */
  text-align: center; /* Center the text within its space */
}

.company-name h1 {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: var(--accent-blue);
  margin: 0;
}

.header-buttons {
  flex-shrink: 0; /* Prevent button from shrinking */
}

/* Buttons */
.button1 {
  background-color: var(--cta-green);
  color: var(--primary-text);
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  display: inline-block;
}

.button1:hover {
  background-color: #018a22;
  transform: translateY(-2px);
}

.button1 a {
  color: var(--primary-text);
  display: block;
}

/* Navigation */
nav {
  background-color: var(--section-bg);
  padding: 1rem 0;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
}

nav li {
  margin: 0.5rem 1rem;
}

.ourservice a {
  border: 2px solid var(--primary-text);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: inline-block;
  transition: border-color 0.3s ease;
}

.service-item a {
  display: block;
  border: 2px solid var(--primary-text);
  padding: 0.5rem;
  border-radius: 8px;
  transition: border-color 0.3s ease;
}

nav a:hover {
  color: var(--cta-green);
}

/* Hero Section */
.hero {
  background: var(--main-bg);
  padding: 4rem 2rem;
  text-align: center;
  color: var(--primary-text);
  margin-top: 250px; /* Increased to clear header/nav */
}

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

.hero h1 {
  color: var(--accent-blue);
}

.hero h2 {
  color: var(--primary-text);
}

/* Slideshow Styling */
.slideshow-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.slideshow {
  width: 100%;
  overflow: hidden;
  position: relative;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.slides {
  display: flex;
  transition: transform 0.6s ease-in-out;
}

.slides img {
  height: 500px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.slideshow-controls {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 20px;
  padding: 5px 10px;
  display: flex;
  gap: 10px;
  z-index: 5;
}

.control-button {
  background: none;
  border: none;
  color: var(--primary-text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
  transition: color 0.3s ease;
}

.control-button:hover {
  color: var(--cta-green);
}

/* Main Content */
main {
  background: var(--main-bg);
  padding: 1rem 0;
}

.photo-gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

/* About Us Section */
.about-us {
  padding: 3rem 1rem;
  background: var(--main-bg);
  text-align: center;
}

.about-us-content {
  max-width: 800px;
  margin: 0 auto;
}

.piling h2 {
  color: var(--accent-blue);
  margin-bottom: 2rem;
  display: block; /* Ensure it’s a block element */
  width: 100%; /* Full width for centering */
  text-align: center; /* Explicitly center the text */
}

.about-scs h2 {
  color: var(--accent-blue);
  margin-bottom: 2rem;
  display: block;
  width: 100%;
  text-align: center;
}

.retaining-walls h2 {
  color: var(--accent-blue);
  margin-bottom: 2rem;
  display: block;
  width: 100%;
  text-align: center;
}

.underpinning h2 {
  color: var(--accent-blue);
  margin-bottom: 2rem;
  display: block;
  width: 100%;
  text-align: center;
}

.structural-support h2 {
  color: var(--accent-blue);
  margin-bottom: 2rem;
  display: block;
  width: 100%;
  text-align: center;
}

.photo-gallery h2 {
  color: var(--accent-blue);
  margin-bottom: 2rem;
  display: block;
  width: 100%;
  text-align: center;
}

.project-history h2 {
  color: var(--accent-blue);
  margin-bottom: 2rem;
  display: block;
  width: 100%;
  text-align: center;
}

.request-quote h2 {
  color: var(--accent-blue);
  margin-bottom: 2rem;
  display: block;
  width: 100%;
  text-align: center;
}

.about-us a:hover {
  border-color: var(--cta-green);
}

.about-us a h2 {
  color: var(--primary-text);
  margin: 0;
}

/* Services Section */
.services {
  padding: 3rem 1rem;
  background: var(--main-bg);
  text-align: center;
}

.ourservice {
  margin-bottom: 2rem;
}

.ourservice a:hover {
  border-color: var(--cta-green);
}

.ourservice a h2 {
  color: var(--primary-text);
  margin: 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

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

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

.service-item a:hover {
  border-color: var(--cta-green);
}

.service-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.service-item h3 {
  margin: 1rem 0 0.5rem;
  color: var(--primary-text);
}

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

/* Footer */
footer {
  background: var(--section-bg);
  padding: 2rem 1rem;
  color: var(--primary-text);
  margin-top: 3rem;
}

.footer-content {
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-content p {
  margin-bottom: 1rem;
}

.membership img {
  height: 60px;
  margin-bottom: 0.5rem;
}

.membership .tagline {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Media Queries */
@media (max-width: 768px) {
  html {
    font-size: 16px;
  }

  .header-nav-container {
    position: static;
  }

  .hero {
    margin-top: 0;
    padding: 2rem 1rem;
  }

  header {
    padding: 15px 20px;
  }

  .container {
    flex-direction: column;
    gap: 15px;
  }

  .company-header {
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    width: 100%;
  }

  .company-name {
    flex-grow: 0; /* Reset flex-grow on mobile */
    text-align: center;
  }

  .company-name h1 {
    font-size: 1.8rem;
  }

  .header-buttons {
    margin-top: 0;
  }

  nav ul {
    justify-content: space-around;
  }

  nav li {
    margin: 0.5rem;
  }

  .slides img {
    height: 300px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .slideshow-controls {
    bottom: 10px;
    padding: 3px 8px;
    gap: 8px;
  }

  .control-button {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .company-name h1 {
    font-size: 1.5rem;
  }

  .button1 {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  nav li {
    margin: 0.3rem;
  }

  nav a {
    padding: 0.4rem 0.6rem;
  }

  .slides img {
    height: 250px;
  }

  .control-button {
    font-size: 1.1rem;
  }
}

/* Piling Section */
.piling {
  background: var(--main-bg);
  padding: 4rem 2rem;
  text-align: center;
  color: var(--primary-text);
  margin-top: 250px; /* Match .hero to clear fixed header/nav */
}

.piling .container {
  display: block; /* Override flex from global .container */
  max-width: 1200px; /* Keep consistent width */
  margin: 0 auto;
  padding: 0 20px;
}

.piling .content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.piling .image-container {
  width: 100%;
}

.piling .image-container img {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.piling .text-content {
  text-align: left;
}

.piling .text-content h3 {
  color: var(--primary-text);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.piling .text-content ul {
  list-style: disc;
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.piling .text-content p {
  margin-bottom: 1rem;
}

.piling .text-content a {
  color: var(--accent-blue);
  transition: color 0.3s ease;
}

.piling .text-content a:hover {
  color: var(--cta-green);
}

/* Media Queries */
@media (max-width: 768px) {
  .piling {
    margin-top: 0;
    padding: 2rem 1rem;
  }

  .piling .content {
    gap: 1.5rem;
  }

  .piling .image-container img {
    max-width: 100%;
  }
}

/* About SCS Section */
.about-scs {
  background: var(--main-bg);
  padding: 4rem 2rem;
  text-align: center;
  color: var(--primary-text);
  margin-top: 250px; /* Match .hero and .piling to clear fixed header/nav */
}

.about-scs .container {
  display: block; /* Override flex from global .container */
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.about-scs .content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.about-scs .image-container {
  width: 100%;
}

.about-scs .image-container img {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.about-scs .text-content {
  text-align: left;
}

.about-scs .text-content p {
  margin-bottom: 1rem;
}

/* Media Queries - Add to existing @media (max-width: 768px) */
@media (max-width: 768px) {
  .about-scs {
    margin-top: 0;
    padding: 2rem 1rem;
  }

  .about-scs .content {
    gap: 1.5rem;
  }

  .about-scs .image-container img {
    max-width: 100%;
  }
}

/* Retaining Walls Section */
.retaining-walls {
  background: var(--main-bg);
  padding: 4rem 2rem;
  text-align: center;
  color: var(--primary-text);
  margin-top: 300px; /* Match .about-scs to clear fixed header/nav */
}

.retaining-walls .container {
  display: block; /* Override flex from global .container */
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.retaining-walls .content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.retaining-walls .image-container {
  width: 100%;
}

.retaining-walls .image-container img {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.retaining-walls .text-content {
  text-align: left;
}

.retaining-walls .text-content p {
  margin-bottom: 1rem;
}

/* Media Queries - Add to existing @media (max-width: 768px) */
@media (max-width: 768px) {
  .retaining-walls {
    margin-top: 0;
    padding: 2rem 1rem;
  }

  .retaining-walls .content {
    gap: 1.5rem;
  }

  .retaining-walls .image-container img {
    max-width: 100%;
  }
}
/* Underpinning Section */
.underpinning {
  background: var(--main-bg);
  padding: 4rem 2rem;
  text-align: center;
  color: var(--primary-text);
  margin-top: 300px; /* Match .about-scs and .retaining-walls to clear fixed header/nav */
}

.underpinning .container {
  display: block; /* Override flex from global .container */
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.underpinning .content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.underpinning .image-container {
  width: 100%;
}

.underpinning .image-container img {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.underpinning .text-content {
  text-align: left;
}

.underpinning .text-content p {
  margin-bottom: 1rem;
}

/* Media Queries - Add to existing @media (max-width: 768px) */
@media (max-width: 768px) {
  .underpinning {
    margin-top: 0;
    padding: 2rem 1rem;
  }

  .underpinning .content {
    gap: 1.5rem;
  }

  .underpinning .image-container img {
    max-width: 100%;
  }
}

/* Structural Support Section */
.structural-support {
  background: var(--main-bg);
  padding: 4rem 2rem;
  text-align: center;
  color: var(--primary-text);
  margin-top: 300px; /* Match .about-scs, .retaining-walls, .underpinning to clear fixed header/nav */
}

.structural-support .container {
  display: block; /* Override flex from global .container */
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.structural-support .content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.structural-support .image-container {
  width: 100%;
}

.structural-support .image-container img {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.structural-support .text-content {
  text-align: left;
}

.structural-support .text-content p {
  margin-bottom: 1rem;
}

/* Media Queries - Add to existing @media (max-width: 768px) */
@media (max-width: 768px) {
  .structural-support {
    margin-top: 0;
    padding: 2rem 1rem;
  }

  .structural-support .content {
    gap: 1.5rem;
  }

  .structural-support .image-container img {
    max-width: 100%;
  }
}
/* Photo Gallery Section */
.photo-gallery {
  background: var(--main-bg);
  padding: 4rem 2rem;
  text-align: center;
  color: var(--primary-text);
  margin-top: 300px; /* Match other pages to clear fixed header/nav */
}

.photo-gallery .container {
  display: block; /* Override flex from global .container */
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.photo-gallery .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.photo-gallery figure {
  margin: 0;
}

.photo-gallery img:hover {
  transform: scale(1.05);
}

.photo-gallery figcaption {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: var(--primary-text);
}

/* Media Queries - Add to existing @media (max-width: 768px) */
@media (max-width: 768px) {
  .photo-gallery {
    margin-top: 0;
    padding: 2rem 1rem;
  }

  .photo-gallery .gallery-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 1.5rem;
  }

  .photo-gallery img {
    height: 250px; /* Slightly taller on mobile for visibility */
  }
}

/* Project History Section */
.project-history {
  background: var(--main-bg);
  padding: 4rem 2rem;
  text-align: center;
  color: var(--primary-text);
  margin-top: 300px; /* Match other pages to clear fixed header/nav */
}

.project-history .container {
  display: block; /* Override flex from global .container */
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.project-history .projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.project-history .project {
  background: var(--section-bg);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-history .project:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.project-history .project h4 {
  color: var(--primary-text);
  margin-bottom: 1rem;
}

.project-history .project img {
  width: 100%;
  max-width: 400px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.project-history .project p {
  color: var(--primary-text);
  font-size: 0.95rem;
}

/* Media Queries - Add to existing @media (max-width: 768px) */
@media (max-width: 768px) {
  .project-history {
    margin-top: 0;
    padding: 2rem 1rem;
  }

  .project-history .projects-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 1.5rem;
  }

  .project-history .project img {
    max-width: 100%; /* Full width on mobile */
  }
}

/* Request a Quote Section */
.request-quote {
  background: var(--main-bg);
  padding: 4rem 2rem;
  text-align: center;
  color: var(--primary-text);
  margin-top: 300px; /* Match other pages to clear fixed header/nav */
}

.request-quote .container {
  display: block; /* Override flex from global .container */
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.request-quote .contact-form {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  background: var(--section-bg);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.request-quote .form-image {
  flex: 1;
}

.request-quote .form-image img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.request-quote .form-content {
  flex: 1;
  text-align: left;
}

.request-quote .form-group {
  margin-bottom: 1.5rem;
}

.request-quote label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--primary-text);
  font-weight: 700;
}

.request-quote input,
.request-quote textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  color: var(--primary-text);
  background: var(--main-bg);
}

.request-quote textarea {
  height: 100px;
  resize: vertical;
}

.request-quote input[type="file"] {
  padding: 0.5rem 0;
}

.request-quote small {
  display: block;
  margin-top: 0.25rem;
  color: var(--secondary-text);
  font-size: 0.85rem;
}

.request-quote button {
  background: var(--cta-green);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 5px;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s ease;
}

.request-quote button:hover {
  background: var(--accent-blue);
}

.request-quote #feedback {
  margin-top: 1rem;
  text-align: center;
}

/* Media Queries - Add to existing @media (max-width: 768px) */
@media (max-width: 768px) {
  .request-quote {
    margin-top: 0;
    padding: 2rem 1rem;
  }

  .request-quote .contact-form {
    flex-direction: column;
    padding: 1.5rem;
  }

  .request-quote .form-image img {
    max-width: 100%;
  }

  .request-quote .form-group {
    margin-bottom: 1rem;
  }
}
