/* Global Styles & Variables */
:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --dark-color: #343a40;
  --light-color: #f8f9fa;
  --white-color: #ffffff;
  --black-color: #000000;
  --gray-color: #e9ecef;
  --text-color: #495057;

  --header-height: 80px; /* Standard header height */
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--dark-color);
  margin-bottom: 1rem;
  line-height: 1.2;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--dark-color);
}

ul {
  list-style: none;
}

.btn {
  display: inline-block;
  padding: 12px 25px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white-color);
}

.btn-primary:hover {
  background-color: #0056b3; /* Darker shade of primary */
  color: var(--white-color);
}

/* Header & Navigation */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--white-color);
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: background-color 0.3s ease, padding 0.3s ease;
}

.main-header.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 10px 0;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
}

.main-nav .nav-list {
  display: flex;
}

.main-nav .nav-list li {
  margin-left: 30px;
}

.main-nav .nav-list a {
  color: var(--dark-color);
  font-weight: 500;
  padding: 5px 0;
  position: relative;
}

.main-nav .nav-list a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.main-nav .nav-list a:hover::after,
.main-nav .nav-list a.active::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001; /* Ensure it's above the nav-list when open */
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--dark-color);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://via.placeholder.com/1920x1080/007bff/ffffff?text=Hero+Background') no-repeat center center/cover;
  color: var(--white-color);
  text-align: center;
  padding: 150px 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: calc(-1 * var(--header-height)); /* Offset for fixed header */
  position: relative; /* To contain its children for z-index */
  z-index: 1; /* Below header */
}

.hero-section .container {
  padding-top: var(--header-height); /* Ensure content is not hidden under header */
}

.hero-section h1 {
  font-size: 4.5rem;
  margin-bottom: 20px;
  color: var(--white-color);
}

.hero-section p {
  font-size: 1.5rem;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

/* General Section Styles */
section {
  padding: 80px 0;
  text-align: center;
}

section:nth-of-type(even) {
  background-color: var(--gray-color);
}

section h2 {
  font-size: 3rem;
  margin-bottom: 20px;
}

section p {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}

/* About Section */
.about-section .about-content {
  text-align: left;
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.about-section .about-content p {
    margin: 0;
}
/* Services Section */
.services-section .service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background-color: var(--white-color);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.service-card h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
}

.service-card p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--secondary-color);
  margin-bottom: 0;
}

/* Contact Section */
.contact-section {
  background-color: var(--dark-color);
  color: var(--white-color);
  padding: 80px 0;
}

.contact-section h2, .contact-section p {
  color: var(--white-color);
}

.contact-form {
  max-width: 700px;
  margin: 40px auto 0;
  background-color: var(--white-color);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--gray-color);
  border-radius: 5px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  color: var(--text-color);
  background-color: var(--light-color);
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.contact-form button.btn-primary {
  width: auto;
  padding: 12px 30px;
}

.form-status {
  margin-top: 20px;
  font-weight: 600;
}

/* Footer */
.main-footer {
  background-color: var(--dark-color);
  color: var(--gray-color);
  text-align: center;
  padding: 30px 0;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsiveness */
@media (max-width: 992px) {
  .hero-section h1 {
    font-size: 3.5rem;
  }
  .hero-section p {
    font-size: 1.25rem;
  }
  section h2 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .main-header .container {
    flex-wrap: wrap;
    justify-content: center;
  }

  .logo {
    margin-bottom: 10px;
    width: 100%;
    text-align: center;
  }

  .main-nav {
    width: 100%;
    display: flex;
    justify-content: flex-end; /* Push toggle to right */
    align-items: center;
    order: -1; /* Place before logo when wrapped */
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    margin-bottom: 10px;
  }
  .main-header .container .logo {
      margin-top: 10px;
  }
  
  .main-nav {
    position: static; /* Reset static */
    width: auto;
    display: flex; /* Make sure menu-toggle is displayed on the right */
    justify-content: space-between;
    align-items: center;
    flex-basis: 100%; /* Take full width */
    order: 0; /* Normal order */
    border-bottom: none;
    margin-bottom: 0;
  }
  .main-nav .logo {
      margin-bottom: 0;
  }
  
  /* Mobile Navigation Specifics */
  .main-nav .nav-list {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%; /* Start off-screen */
    width: 80%;
    max-width: 300px;
    height: 100%;
    background-color: var(--dark-color);
    padding: 80px 20px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    transition: right 0.4s ease-in-out;
    z-index: 999;
    justify-content: flex-start;
    align-items: center;
  }

  .nav-list li {
    margin: 20px 0;
    width: 100%;
    text-align: center;
  }

  .nav-list a {
    color: var(--white-color);
    font-size: 1.2rem;
    padding: 10px 0;
    display: block;
  }
  .nav-list a::after {
      background-color: var(--primary-color);
      bottom: 0;
  }

  .menu-toggle {
    display: block;
  }

  body.nav-open .main-nav .nav-list {
    right: 0; /* Slide in */
  }

  body.nav-open .menu-toggle span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  body.nav-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }
  body.nav-open .menu-toggle span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }

  .hero-section {
    padding: 100px 0;
  }
  .hero-section h1 {
    font-size: 2.5rem;
  }
  .hero-section p {
    font-size: 1rem;
  }
  section {
    padding: 60px 0;
  }
  section h2 {
    font-size: 2rem;
  }
  .about-section .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .about-section .about-content p {
    text-align: left;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }
  .contact-form {
    padding: 30px 20px;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }
  
  .hero-section h1 {
      font-size: 2.2rem;
  }
  .hero-section p {
      font-size: 0.9rem;
  }
  .btn {
      padding: 10px 20px;
      font-size: 0.9rem;
  }

  .form-group label {
      font-size: 0.9rem;
  }
  .form-group input, .form-group textarea {
      padding: 10px;
      font-size: 0.9rem;
  }
}