/* General Styles */
html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: 'Helvetica Neue', Helvetica, Arial, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  background-color: #fff;
}

html {
  scroll-behavior: smooth;
}

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

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 0;
  transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

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

.navbar.scrolled {
  background: white;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.logo {
  font-weight: bold;
  font-size: 1.2rem;
  color: #fff;
  transition: color 0.3s ease-in-out;
}

.logoheader {
  width: 150px; /* Adjust as needed */
  height: auto;
}

.navbar.scrolled .logo {
  color: #2c3e50;
}

.nav-links a {
  margin-left: 2rem;
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  transition: color 0.3s ease-in-out;
}

.navbar.scrolled .nav-links a {
  color: #2c3e50;
}

.nav-links a:hover {
  color: #007BFF;
}

/* Hero Section */
.hero {
  background-size: cover;
  background-position: center;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  color: white;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  z-index: 1;
  /* No blur by default */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: backdrop-filter 1s, -webkit-backdrop-filter 1s;
}

.hero.scrolled-hero::before {
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.hero-overlay {
  padding: 0 1rem; /* Add some padding for smaller screens */
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 4.5rem;
  font-weight: bold;
}

.hero-subtitle {
  font-size: 1.5rem;
  margin: 1rem 0 2rem;
}

.btn-primary {
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease-in-out;
}

.btn-primary:hover {
  background-color: rgba(41, 41, 41, 0.8);
}

/* Search Section */
.search-section {
  background-color: #f6f6f6;
  padding: 2rem 0;
  text-align: center;
}

.search-form {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.search-form select,
.search-form input {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  min-width: 150px;
}

.search-form button {
  background-color: #555;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 5px;
}

/* Content Sections */
.content-section {
  padding: 4rem 0;
}

.light-bg {
  background-color: #f9f9f9;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background: white;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  text-align: center;
}

.image-placeholder {
  height: 150px;
  background-color: #ddd;
  border-radius: 5px;
  margin-bottom: 1rem;
}

.project-card a {
  color: #007BFF;
  text-decoration: none;
  font-weight: bold;
}

.project-card a:hover {
  text-decoration: underline;
}

/* Project Detail Page */
.project-detail-header {
  padding: 8rem 0 4rem;
  background-color: #2c3e50;
  color: white;
  text-align: center;
}

.project-detail-header h1 {
  font-size: 3rem;
  margin: 0;
}

.project-image-full {
  width: 100%;
  height: 500px;
  background-color: #ddd;
  background-size: cover;
  background-position: center;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 100%;
}

.contact-form button {
  align-self: flex-start;
  background-color: #007BFF;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 5px;
}

/* Footer */
.footer {
  background-color: #f6f6f6;
  text-align: center;
  padding: 2rem 0;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #666;
}

/* Fade-in Up Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade-in Left Animation */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Fade-in Right Animation */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Apply fadeInUp to sections and hero overlay */
.content-section,
.hero-overlay {
  opacity: 0;
  animation: fadeInUp 1s forwards;
  animation-play-state: paused;
}

/* Staggered fadeInUp for project cards */
.project-card {
  opacity: 0;
  animation: fadeInUp 0.8s forwards;
  animation-play-state: paused;
}
.project-card:nth-child(1) { animation-delay: 0.2s; }
.project-card:nth-child(2) { animation-delay: 0.4s; }
.project-card:nth-child(3) { animation-delay: 0.6s; }
.project-card:nth-child(4) { animation-delay: 0.8s; }

/* Animate nav links in from left */
.nav-links a {
  opacity: 0;
  animation: fadeInLeft 0.7s forwards;
  animation-play-state: paused;
}
.nav-links a:nth-child(1) { animation-delay: 0.2s; }
.nav-links a:nth-child(2) { animation-delay: 0.4s; }
.nav-links a:nth-child(3) { animation-delay: 0.6s; }
.nav-links a:nth-child(4) { animation-delay: 0.8s; }

/* Animate hamburger in from right */
.hamburger {
  opacity: 0;
  animation: fadeInRight 0.7s forwards;
  animation-delay: 1s;
  animation-play-state: paused;
}

/* Animate hero title and subtitle */
.hero-title {
  opacity: 0;
  animation: fadeInUp 1s forwards;
  animation-delay: 0.2s;
  animation-play-state: paused;
}
.hero-subtitle {
  opacity: 0;
  animation: fadeInUp 1s forwards;
  animation-delay: 0.4s;
  animation-play-state: paused;
}
.btn-primary {
  opacity: 0;
  animation: fadeInUp 1s forwards;
  animation-delay: 0.6s;
  animation-play-state: paused;
}

/* Staggered animation for project cards */
.project-card {
  transition: transform 0.3s, box-shadow 0.3s;
  animation-delay: 1s;
}

.project-card:nth-child(1) { animation-delay: 1.1s; }
.project-card:nth-child(2) { animation-delay: 1.2s; }
.project-card:nth-child(3) { animation-delay: 1.3s; }
.project-card:nth-child(4) { animation-delay: 1.4s; }

.project-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

/* Button animation */
.btn-primary {
  transition: background 0.3s, transform 0.2s;
}
.btn-primary:hover {
  background: #2d6a4f;
  transform: scale(1.05);
}

/* Responsive Navbar: Hamburger menu for mobile */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 200;
}
.hamburger span {
  height: 4px;
  width: 100%;
  background: #fff;
  margin: 4px 0;
  border-radius: 2px;
  transition: background 0.3s;
}
.navbar.scrolled .hamburger span {
  background: #2c3e50;
}
@media (max-width: 800px) {
  .nav-links {
    position: fixed;
    top: 64px;
    right: 0;
    background: rgba(255,255,255,0.98);
    flex-direction: column;
    align-items: flex-end;
    width: 220px;
    padding: 2rem 1.5rem;
    box-shadow: -2px 0 12px rgba(0,0,0,0.08);
    transform: translateX(100%);
    transition: transform 0.3s;
    z-index: 150;
    min-height: 100vh;
    display: flex; /* Ensure flex is set */
  }
  .nav-links.open {
    transform: translateX(0);
  }
  .nav-links a {
    display: block;         /* Stack links vertically */
    width: 100%;            /* Make links fill the menu width */
    margin: 1rem 0;         /* Vertical spacing */
    font-size: 1.2rem;
    text-align: right;      /* Align text to the right */
    color: #2c3e50 !important;
  }
  .hamburger {
    display: flex;
  }
}

/* Responsive Typography & Spacing */
@media (max-width: 900px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .hero-subtitle {
    font-size: 1.1rem;
  }
  .container {
    padding: 0 0.5rem;
  }
}
@media (max-width: 600px) {
  .hero-title {
    font-size: 1.6rem;
  }
  .content-section {
    padding: 2rem 0;
  }
  .project-grid {
    gap: 1rem;
  }
}

/* Microinteractions & Animations */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.3);
  border-radius: 100%;
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
  z-index: 1;
}
.btn-primary:active::after {
  width: 200%;
  height: 200%;
  transition: 0s;
}
.btn-primary {
  z-index: 2;
}

/* Card hover microinteraction */
.project-card {
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s, border 0.2s;
  border: 1.5px solid transparent;
}
.project-card:hover {
  border: 1.5px solid #2d6a4f;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  transform: scale(1.04);
}

/* Animate map section fade-in on scroll */
#map-section {
  opacity: 0;
  transition: opacity 0.8s, transform 0.8s;
}
#map-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 1rem;
  transition: transform 0.4s cubic-bezier(.4,2,.6,1), box-shadow 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.project-card:hover .project-image {
  transform: scale(1.05);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100vw; height: 100vh;
  overflow: auto;
  background: rgba(0,0,0,0.6);
  animation: fadeIn 0.3s;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-content {
  background: #fff;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 12px;
  max-width: 500px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  animation: fadeInUp 0.5s;
  text-align: center;
}
.close-modal {
  position: absolute;
  top: 1rem; right: 1rem;
  font-size: 2rem;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
}
.close-modal:hover {
  color: #007BFF;
}
.modal-image {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}
@media (max-width: 600px) {
  .modal-content {
    padding: 1rem;
    max-width: 95vw;
  }
  .modal-image {
    max-height: 140px;
  }
}

