:root {
  --primary-color: #d26d00;  /* New orange color */
  --secondary-color: #ffeea9; /* Bright yellow for accent */
  --text-color: #333;
  --light-text: #fff;
  --background-color: #f8f8f8;
  --section-bg: #fff;
  --footer-bg: #111;
  --heading-font: 'Oswald', sans-serif;
  --body-font: 'Open Sans', sans-serif;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px; /* Adjusted for top-info + header */
}

body {
  padding-top: 120px; /* Added padding for fixed elements */
  font-family: var(--body-font);
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--background-color);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Utility Classes */
.btn {
  display: inline-flex; /* Changed to inline-flex for alignment */
  align-items: center; /* Vertically center content */
  justify-content: center; /* Horizontally center content */
  padding: 12px 30px;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 14px;
}

.btn:hover {
  background-color: var(--primary-color);
  color: var(--light-text);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-alt {
  background-color: transparent;
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
}

.btn-alt:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.text-center {
  text-align: center;
}

.section {
  padding: 80px 0;
}

.section-title {
  font-family: var(--heading-font);
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-transform: uppercase;
  position: relative;
  padding-bottom: 15px;
  text-align: center; /* Center the title text */
}

.section-title:after {
  content: "";
  position: absolute;
  width: 80px;
  height: 3px;
  background-color: var(--secondary-color);
  bottom: 0;
  left: 50%; /* Center the divider */
  transform: translateX(-50%); /* Center the divider */
}

/* This rule below is now redundant for .section-title:after if .section-title itself is always centered,
   but leaving it in case .text-center is used for other ::after elements or for other reasons.
   If it only ever applied to .section-title:after, it could be removed. */
.text-center .section-title:after {
  left: 50%;
  transform: translateX(-50%);
}

.section-subtitle {
  font-size: 16px;
  margin-bottom: 40px;
  opacity: 0.8;
}

.grid {
  display: grid;
  gap: 30px;
}

.two-columns {
  grid-template-columns: 1fr 1fr;
}

/* Header */
.header {
  position: fixed;
  top: 38px; /* Position below the top-info bar (estimated height) */
  left: 0;
  width: 100%;
  background-color: #fff; /* Fully opaque white to prevent grey line */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: var(--transition);
}

.header.scrolled {
  padding: 10px 0;
  background-color: rgba(255, 255, 255, 0.98);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 50px;
}

.text-logo {
  font-family: var(--heading-font); /* Oswald */
  font-weight: 600; /* SemiBold */
  font-size: 24px; /* Adjust as needed */
  color: var(--primary-color);
  text-transform: uppercase;
  line-height: 1; /* Ensure it aligns well */
  padding-left: 20px;
}

.logo-text {
  margin-left: 10px;
}

.logo-text h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
}

.logo-text p {
  font-size: 12px;
  color: #777;
}

.top-info {
  background-color: var(--primary-color);
  color: var(--light-text);
  padding: 8px 0;
  font-size: 14px;
  position: fixed; /* Make top info fixed */
  top: 0;          /* Position at the top */
  left: 0;
  width: 100%;
  z-index: 1001;   /* Ensure it's above the header */
}

.top-info-container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.top-info-item {
  margin-left: 20px;
  display: flex;
  align-items: center;
}

.top-info-item i {
  margin-right: 6px;
  font-size: 16px;
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  width: 30px;
  cursor: pointer;
  z-index: 2000;
}

.mobile-menu-btn span {
  background: var(--primary-color);
  border-radius: 10px;
  height: 3px;
  margin: 3px 0;
  transition: .4s ease;
}

.main-nav {
  display: flex;
}

.nav-list {
  display: flex;
  align-items: center;
}

.nav-item {
  margin-left: 30px;
}

.nav-link {
  font-weight: 600;
  font-size: 16px;
  color: var(--text-color);
  transition: var(--transition);
  text-transform: uppercase;
  position: relative;
  padding: 5px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color);
}

.nav-link:after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav-link:hover:after, .nav-link.active:after {
  width: 100%;
}

/* Hero Section */
.hero {
  margin-top: -50px; /* Move hero section up */
  height: 66vh; /* Reduced viewport height */
  min-height: 450px; /* Adjusted minimum height */
  background-image: url('assets/images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  color: var(--light-text);
}

/* .hero:before { */
  /* content: ''; */
  /* position: absolute; */
  /* top: 0; */
  /* left: 0; */
  /* width: 100%; */
  /* height: 100%; */
  /* background: rgba(0, 0, 0, 0.5); */ /* This was for light mode */
  /* z-index: 1; */
/* } */

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-title {
  font-family: var(--heading-font);
  font-size: 68px;
  font-weight: 800;
  margin-bottom: 20px;
  text-transform: uppercase;
  line-height: 1;
}

.hero-subtitle {
  font-size: 20px; /* Reverted to original size */
  margin-bottom: 30px;
  opacity: 0.9;
}

.hero-subtitle2 {
  font-size: 16px; /* Smaller size for the second line */
  margin-bottom: 30px;
  opacity: 0.9;
  /* Ensure it's centered on mobile if needed, inheriting from hero-subtitle's parent or specific mobile rules */
}

.hero-subtitle2-wrapper {
  max-width: 383px;
  /* margin-left and margin-right will be set in media query for mobile */
}

.hero-btns {
  display: flex;
  gap: 15px;
}

.hero-logo-overlay {
  position: absolute;
  top: 50%;
  right: 330px; /* Adjust as needed */
  transform: translateY(-50%);
  opacity: 0.09;
  max-width: 407px; /* Adjust as needed */
  height: auto;
  z-index: 2; /* Ensure it's above the hero overlay but below text if needed */
}

/* Services Section */
.services {
  background-color: var(--section-bg);
}

.service-card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-img {
  height: 200px;
  overflow: hidden;
}

.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.service-card:hover .service-img img {
  transform: scale(1.05);
}

.service-content {
  padding: 25px;
}

.service-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.service-text {
  margin-bottom: 20px;
  color: #777;
}

.services-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* About Section */
.about {
  background-color: #f4f4f4;
}

.about-content {
  display: flex;
  align-items: flex-start; /* Changed from center to flex-start for top alignment */
  gap: 50px;
}

.about-image {
  flex: 1;
}

.about-image img {
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-text {
  flex: 1;
}

.about-title {
  margin-bottom: 20px;
}

.about-description {
  margin-bottom: 30px;
}

.about-features {
  margin-bottom: 30px;
}

.feature-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.feature-icon {
  width: 40px;
  height: 40px;
  background-color: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  color: var(--primary-color);
}

/* Calculator Section */
.calculator {
  background-color: var(--primary-color);
  color: var(--light-text);
  padding: 80px 0;
}

.calculator .section-title {
  color: var(--light-text);
}

.calculator-form {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 8px;
  max-width: 800px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 4px;
  color: var(--text-color);
  font-size: 16px;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-col {
  flex: 1;
}

.calculator-result {
  margin-top: 30px;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--text-color);
  padding: 20px;
  border-radius: 8px;
  display: none;
}

.calculator-result.show {
  display: block;
}

/* Environmental Section */
.environmental {
  background-color: #f9f9f9;
  background-image: url('assets/images/environmental-bg.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
}

.environmental-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 0 auto; /* Center the block itself */
  text-align: center; /* Center the inline content within this div */
}

.environmental-title {
  color: var(--primary-color);
  margin-bottom: 20px;
}

.environmental-text {
  margin-bottom: 30px;
  color: #f9f9f9;
}

.stats-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 50px;
}

.stat-item {
  text-align: center;
  flex: 1;
  min-width: 200px;
}

.stat-number {
  font-size: 40px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.stat-label {
  font-size: 16px;
  text-transform: uppercase;
  font-weight: 600;
  color: #f9f9f9;
}

/* Contact Section */
.contact {
  background-color: #fff;
}

.contact-container {
  display: flex;
  gap: 50px;
}

.contact-info {
  flex: 1;
}

.contact-info-item {
  display: flex;
  margin-bottom: 25px;
}

.contact-icon {
  min-width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  color: var(--light-text);
}

.contact-details h3 {
  font-size: 18px;
  margin-bottom: 5px;
}

.contact-details p {
  color: #777;
}

.contact-form {
  flex: 1;
  background-color: #111111;
  padding: 30px;
  border-radius: 8px;
}

.contact-form .form-control {
  background-color: #fff;
  margin-bottom: 20px;
}

textarea.form-control {
  height: 150px;
  resize: none;
}

/* Footer */
.footer {
  background-color: var(--footer-bg);
  color: #ccc;
  padding: 60px 0 0;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.footer-logo img {
  height: 40px;
  margin-bottom: 20px;
}

.footer .text-logo {
  color: var(--light-text); /* White text for footer logo */
  font-size: 22px; /* Slightly smaller for footer */
  padding-left: 0; /* Remove padding for footer logo */
}

.footer-about p {
  margin-bottom: 20px;
  line-height: 1.7;
}

.footer-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--light-text);
  position: relative;
  padding-bottom: 10px;
}

.footer-title:after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: var(--secondary-color);
}

.footer-links li {
  margin-bottom: 15px;
}

.footer-links a {
  color: #ccc;
  transition: var(--transition);
  position: relative;
  padding-left: 15px;
}

.footer-links a:before {
  content: '›';
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--secondary-color);
}

.footer-links a:hover {
  color: var(--secondary-color);
  padding-left: 20px;
}

.footer-bottom {
  padding: 20px 0;
  margin-top: 40px;
  text-align: center;
  font-size: 14px;
  color: #777;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.social-link {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-link:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 68px;
  }

  .about-content {
    flex-direction: column;
  }

  .contact-container {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 28px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .two-columns {
    grid-template-columns: 1fr;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100vh;
    background-color: var(--light-text);
    flex-direction: column;
    padding-top: 100px;
    transition: var(--transition);
    z-index: 999;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    padding-right: 20px;
  }

  .main-nav.show {
    left: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .nav-item {
    margin: 0;
    width: 100%;
    border-bottom: 1px solid #eee;
  }

  .nav-link {
    display: block;
    padding: 15px 20px;
    width: 100%;
  }

  .top-info { /* Adjust top-info bar for mobile */
    padding: 10px 0; /* Slightly more padding for stacked items */
  }

  .top-info-container {
    flex-direction: column;
    align-items: center; /* Center items when stacked */
  }

  .top-info-item {
    margin: 4px 0; /* Adjust margin for stacked items */
    margin-left: 0;
    font-size: 12px; /* Reduce font size for mobile */
  }

  .top-info-item i {
    font-size: 14px; /* Slightly smaller icons */
  }

  /* Recalculate header top and body padding for mobile */
  body {
    padding-top: 156px; /* Increased for more space: 92px for top-info + 64px for header */
  }
  .header {
    top: 92px; /* Increased for more space, to accommodate taller top-info */
  }
  .theme-toggle-container {
    display: none; /* Hide theme toggle in top bar on tablet */
  }
}

@media (max-width: 480px) {
  .header-container {
    position: relative; /* For positioning menu button if needed */
  }
  .header-container .logo {
    flex-grow: 1; /* Allow logo to take space */
    text-align: center; /* Center the text logo */
  }
  .header-container .text-logo {
    margin: 0 auto; /* Ensure it's centered if it's an inline-block/block */
    padding-left: 0; /* Remove padding-left for smallest screens */
    /* Adjust font size if needed for very small screens */
  }
  .mobile-menu-btn {
    /* Ensure mobile menu button stays on the right if header-container changes affect it */
    position: absolute;
    right: 20px; /* Match container padding */
    top: 50%;
    transform: translateY(-50%);
  }

  /* Increase spacing between top-info and header */
  body {
    padding-top: 156px; /* Increased from 146px */
  }
  .header {
    top: 92px; /* Increased from 82px */
  }

  .hero {
    margin-top: 0; /* Remove negative margin for mobile */
    height: 75vh; /* Increase height for mobile */
  }

  .hero-title {
    font-size: 28px;
    text-align: center; /* Center hero title */
  }

  .hero-subtitle {
    font-size: 18px; /* This was the mobile size for hero-subtitle */
    text-align: center; 
  }

  .hero-subtitle2 { /* Style for the new subtitle on mobile */
    font-size: 16px; /* Keep it at 16px for mobile too */
    text-align: center; /* Also center subtitle for consistency */
  }

  .hero-subtitle2-wrapper { /* Center the wrapper on mobile */
    margin-left: auto;
    margin-right: auto;
  }

  .hero-btns {
    flex-direction: column;
    align-items: center; /* Center buttons when stacked */
  }

  .form-row {
    flex-direction: column;
  }

  .stat-item {
    min-width: 100%;
  }

  .theme-toggle-container {
    display: none; /* Hide theme toggle in top bar on mobile */
  }
}

/* Lazy loading */
.lazy-load {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.lazy-load.loaded {
  opacity: 1;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.8s ease forwards;
}

.fade-in-delay-1 {
  animation-delay: 0.2s;
}

.fade-in-delay-2 {
  animation-delay: 0.4s;
}

.fade-in-delay-3 {
  animation-delay: 0.6s;
}

/* Responsive adjustments for the hero logo */
@media (max-width: 768px) {
  .hero-logo-overlay {
    max-width: 260px; /* Smaller logo on tablets */
    right: 15px;
  }
}

@media (max-width: 480px) {
  .hero-logo-overlay {
    display: none; /* Hide logo on very small screens as requested by user to figure out later */
  }
}

/* Subtle phone shake animation */
@keyframes subtle-shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-1px);
  }
  50% {
    transform: translateX(1px);
  }
  75% {
    transform: translateX(-1px);
  }
}

.phone-number-link {
  display: inline-block; /* Allows transform to work */
  animation: subtle-shake 2s infinite linear;
  animation-delay: 3s; /* Start animation after a delay */
}

/* Theme Toggle */
.theme-toggle-container {
  margin-left: 20px; /* Spacing from the previous item */
}

#theme-toggle {
  cursor: pointer;
  font-size: 18px; /* Adjust size as needed */
  color: var(--light-text); /* Icon color in light mode */
}

/* Dark Mode Variables */
body.dark-mode {
  --primary-color: #ff8c00; /* Dark orange for dark mode */
  --secondary-color: #f0e68c; /* Khaki for dark mode accent */
  --text-color: #f0f0f0;
  --light-text: #1a1a1a; /* Very dark grey for text on light backgrounds in dark mode */
  --background-color: #121212;
  --section-bg: #1e1e1e;
  --footer-bg: #0d0d0d;
}

/* Dark Mode General Styles */
body.dark-mode .header {
  background-color: #1e1e1e; /* Darker header background */
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.05); /* Lighter shadow for dark mode */
}

body.dark-mode .top-info {
  background-color: var(--primary-color); /* Keep primary color for top bar or adjust if needed */
}

body.dark-mode #theme-toggle {
  color: var(--secondary-color); /* Icon color in dark mode */
}

body.dark-mode .nav-link {
  color: var(--text-color);
}

body.dark-mode .nav-link:hover,
body.dark-mode .nav-link.active {
  color: var(--primary-color);
}

body.dark-mode .nav-link:after {
  background-color: var(--primary-color);
}

body.dark-mode .hero {
  color: #f0f0f0; /* Ensure hero text is light in dark mode */
}

/* body.dark-mode .hero:before { */
  /* background: rgba(0, 0, 0, 0.7); */ /* This was for dark mode */
/* } */

body.dark-mode .section-title {
  color: var(--primary-color);
}

body.dark-mode .section-title:after {
  background-color: var(--secondary-color);
}

body.dark-mode .service-card {
  background-color: #2a2a2a;
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.03);
}

body.dark-mode .service-card:hover {
  box-shadow: 0 15px 30px rgba(255, 255, 255, 0.06);
}

body.dark-mode .service-text {
  color: #ccc;
}

body.dark-mode .about {
  background-color: #1a1a1a;
}

body.dark-mode .about-description,
body.dark-mode .feature-text p {
  color: #ccc;
}

body.dark-mode .calculator {
  background-color: var(--primary-color); /* Or a darker shade if preferred */
}

body.dark-mode .calculator .section-title {
  color: #1a1a1a; /* Dark text on primary color background */
}

body.dark-mode .calculator-form {
  background-color: rgba(0, 0, 0, 0.2); /* Darker form background */
}

body.dark-mode .form-control {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark-mode .form-group label {
  color: #f0f0f0;
}

body.dark-mode .calculator-result {
  background-color: rgba(0, 0, 0, 0.3);
  color: var(--text-color);
}

body.dark-mode .environmental-text,
body.dark-mode .stat-label {
  color: #f0f0f0;
}

body.dark-mode .contact {
  background-color: var(--section-bg);
}

body.dark-mode .contact-details p {
  color: #ccc;
}

body.dark-mode .contact-form {
  background-color: #2a2a2a;
}

body.dark-mode .footer {
  background-color: var(--footer-bg);
  color: #aaa;
}

body.dark-mode .footer .text-logo {
  color: #f0f0f0;
  padding-left: 0; /* Ensure no padding in dark mode either */
}

body.dark-mode .footer-title {
  color: #f0f0f0;
}

body.dark-mode .footer-title:after {
  background-color: var(--secondary-color);
}

body.dark-mode .footer-links a {
  color: #aaa;
}

body.dark-mode .footer-links a:hover {
  color: var(--secondary-color);
}

body.dark-mode .footer-bottom {
  color: #666;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark-mode .btn {
  background-color: var(--secondary-color);
  color: var(--light-text); /* Text on button */
}
body.dark-mode .btn:hover {
  background-color: var(--primary-color);
  color: #1a1a1a;
}

body.dark-mode .btn-alt {
  border: 2px solid var(--secondary-color);
}

body.dark-mode .btn-alt:hover {
  background-color: var(--secondary-color);
  color: var(--light-text);
}

body.dark-mode .main-nav { /* For mobile menu in dark mode */
  background-color: var(--section-bg);
}

body.dark-mode .nav-item {
  border-bottom: 1px solid #333;
}
