/* Reset margin and set base font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Poppins:wght@400;500;700&display=swap');
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Poppins, sans-serif;
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Header styles */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 1000;
}

/* This wrapper controls horizontal padding and max width */
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 100px;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Logo image */
.logo img {
  height: 70px;
  width: auto;
}

/* Navigation list */
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px;
}

/* Base nav links */
nav ul li a {
  position: relative;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s ease;
}

nav ul li a.active {
  color: #809671;
  font-weight: 600;
}

nav ul li a.active::after {
  transform: scaleX(1);
}

/* Add custom underline using pseudo-element */
nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -4px; /* Adjust this for spacing from text */
  left: 0;
  width: 100%;
  height: 2px; /* Thickness of underline */
  background-color: #809671;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

/* On hover, animate underline and change color */
nav ul li a:hover {
  color: #809671;
}

nav ul li a:hover::after {
  transform: scaleX(1);
}


.home-section {
  position: relative;
  min-height: 80vh; /* Fill entire screen height */
  padding-top: 120px;
  padding-left: 250px;
  padding-right: 250px;
  background-image: url('assets/header1.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  color: white;
}

/* Overlay */
.home-section .overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

/* Content */
.home-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  text-align: left;
}

.home-content h1 {
  font-size: 5rem;
  margin: 0 0 15px 0;
}

.home-content p {
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0 0 20px 0;
}

.home-content a {
  padding: 15px 35px;
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 600;
  background-color: #809671;
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.home-content a:hover {
  background-color: #0056b3;
}


.about-section {
  display: flex;
  align-items: stretch; /* ensures both sides equal height */
  gap: 40px;
  padding: 80px 250px;
  background-color: #ffffff;
  color: #333;
  flex-wrap: wrap; /* for responsiveness */
}

.about-content {
  flex: 1 1 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-content h2 {
  font-size: 0.9rem;
  color: #809671;
}

.about-content h3 {
  font-size: 1.9rem;
  font-weight: 600;
  color: #111;
}

.about-content p {
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 600px;
}

.about-content a {
  font-size: 1.0rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 5px;
  color: #809671;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.about-image {
  flex: 1 1 200px;
  overflow: hidden;
  position: relative;
  border-radius: 20px;  
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.services-section {
  padding: 80px 200px;
  background-color: #fafafa;
  color: #333;
}

.section-header h2 {
  font-size: 0.9rem;
  color: #809671;
  text-align: center;
}

.section-header h3 {
  font-size: 1.9rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 40px;
  text-align: center;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  justify-items: center; /* center cards horizontally */
}

.service-card {
  position: relative;
  width: auto;  
  height: 400px;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.3s ease;
}

.service-card:hover {
  transform: scale(1.05);
  z-index: 10;
}

.service-card .overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.5);
  transition: background-color 0.3s ease;
  z-index: 1;
}

.service-card:hover .overlay {
  background-color: rgba(0,0,0,0.7);
}

.service-text {
  position: relative;
  z-index: 2;
  padding: 0 15px;
}

.service-text h4 {
  font-size: 1.5rem;
  margin: 0;
  font-weight: 600;
}

.service-text .description {
  margin-top: 10px;
  font-size: 1rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease;
}

/* Show description on hover */
.service-card:hover .description {
  opacity: 1;
  max-height: 120px; /* enough space for description */
}

.contact-section {
  padding: 80px 250px;
  background-color: #ffffff;
  color: #333;
}

.contact-section .section-header h2 {
  font-size: 0.9rem;
  color: #809671;
  margin-bottom: 10px;
  text-align: center;
}

.contact-section .section-header h3 {
  font-size: 1.9rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 40px;
  text-align: center;
}

.contact-form {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 20px;
  resize: none;
  font-family: inherit;
  box-sizing: border-box;
}

.form-group textarea {
  height: 150px;
}

.form-group button {
  width: 100%;
  padding: 20px;
  font-size: 0.9rem;
  background-color: #809671;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.form-group button:hover {
  background-color: #0056b3;
}

.footer {
  background-color: #111;
  color: white;
  padding: 100px 100px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 30px;
}

/* Left: Company Info */
.footer-left {
  flex: 1 1 250px;
  text-align: left;
}

.footer-left h2 {
  margin: 0;
  font-size: 1.8rem;
  color: #fff;
}

.footer-left a {
  font-size: 1.3rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 5px;
  color: #809671;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.footer-left p {
  margin-top: 10px;
  font-size: 1rem;
  color: #ccc;
}

/* Center: Social Icons */
.footer-center {
  flex: 1 1 200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Social Icon styles same as before */
.social-icon {
  width: 40px;
  height: 40px;
  padding: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;  
  background-color: #444;
  border-radius: 10%;
  margin: 2px;
  transition: background-color 0.3s ease;
}

.social-icon:hover {
  transform: scale(1.05);
}

.social-icon img {
  width: 40px;
  height: 40px;
}

/* Mobile Optimization */
@media (max-width: 768px) {
  /* Header inner padding smaller */
  .header-inner {
    padding: 12px 20px;
  }

  /* Logo smaller */
  .logo img {
    height: 50px;
  }

  /* Navigation: stack or hide or make hamburger - here just wrap & smaller gap */
  nav ul {
    flex-wrap: wrap;
    gap: 15px;
  }

  /* Home Section */
  .home-section {
    height: auto; /* allow content height */
    padding: 120px 20px 40px; /* less horizontal padding */
    justify-content: center; /* center content on small screens */
    text-align: center;
  }

  .home-content {
    max-width: 100%;
  }

  .home-content h1 {
    font-size: 6rem;
  }

  .home-content p {
    font-size: 1.2rem;
  }

  .home-content a {
    padding: 12px 25px;
    font-size: 0.9rem;
  }

  /* About Section */
  .about-section {
    padding: 40px 20px;
    flex-direction: column;
    gap: 25px;
    text-align: center;
  }

  .about-content {
    flex: none;
  }

  .about-content h3 {
    font-size: 1.5rem;
  }

  .about-content p {
    max-width: 100%;
    font-size: 1rem;
  }

  .about-image {
    flex: none;
    height: 250px; /* fix height for image */
  }

  /* Services Section */
  .services-section {
    padding: 40px 20px;
  }

  .services-grid {
    grid-template-columns: 1fr; /* stack cards vertically */
    gap: 20px;
  }

  .service-card {
    height: 300px;
  }

  .service-text h4 {
    font-size: 1.3rem;
  }

  .service-text .description {
    max-height: 150px;
  }

  /* Contact Section */
  .contact-section {
    padding: 40px 20px;
  }

  .contact-form {
    max-width: 100%;
  }

  /* Footer */
  .footer {
    padding: 40px 20px;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-left,
  .footer-center,
  .footer-right {
    flex: none;
    margin-bottom: 30px;
  }

  .footer-right {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
  }

  .footer-left,
  .footer-center,
  .footer-right {
    flex: none;
    width: 100%;
    margin-bottom: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-left p {
    max-width: 90%;
  }

  .social-wrapper {
    align-items: center;
  }

  .social-icons {
    justify-content: center;
  }

  .chatbot-container {
    justify-content: center;
  }
}

/* Hide hamburger by default on desktop */
.hamburger {
  display: none;
  font-size: 28px;
  cursor: pointer;
  user-select: none;
}

/* Hide nav by default on small screens */
@media (max-width: 768px) {
  .hamburger {
    display: block;
    z-index: 2001;
  }

  nav {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: #fff;
    display: none;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }

  nav ul {
    flex-direction: column;
    width: 100%;
    padding: 0;
    margin: 0;
  }

  nav ul li {
    width: 100%;
    text-align: center;
    padding: 15px 0;
    border-top: 1px solid #eee;
  }

  nav ul li:first-child {
    border-top: none;
  }

  nav ul li a {
    font-size: 1.2rem;
    color: #333;
  }

  nav.active {
    display: flex;
  }
}
