/* Main Content  */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
  margin-top: 0;
}

.page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-hero {
  background-image: url("../assets/images/work1.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  margin: 0;
  margin-bottom: 4rem;
  min-height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding-top: 80px;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 96, 100, 0.9) 0%,
    rgba(0, 96, 100, 0.6) 40%,
    rgba(0, 96, 100, 0.4) 70%,
    rgba(0, 0, 0, 0.1) 100%
  );
  z-index: 1;
}

.page-hero > * {
  position: relative;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 4rem 2rem 3rem;
}

.page-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  font-weight: 400;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(
    to bottom,
    rgba(0, 96, 100, 0.95) 0%,
    rgba(0, 96, 100, 0.8) 70%,
    rgba(0, 96, 100, 0.4) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.nav-container {
  position: relative;
  z-index: 1001;
}

body {
  padding-top: 0;
}

.footer {
  position: relative;
  z-index: 1002;
}

/* Filters */
.filters {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: end;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 96, 100, 0.1);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 200px;
}

.filter-label {
  font-weight: 600;
  color: #006064;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-select {
  padding: 0.75rem 1rem;
  border: 2px solid #e0f2f1;
  border-radius: 8px;
  font-size: 1rem;
  background: white;
  color: #333;
  transition: all 0.3s ease;
}

.filter-select:focus {
  outline: none;
  border-color: #006064;
  box-shadow: 0 0 0 3px rgba(0, 96, 100, 0.1);
}

.filter-actions {
  display: flex;
  gap: 1rem;
  margin-left: auto;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: #006064;
  color: white;
}

.btn-primary:hover {
  background: #004d4f;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 96, 100, 0.3);
}

.btn-secondary {
  background: transparent;
  color: #006064;
  border: 2px solid #006064;
}

.btn-secondary:hover {
  background: #006064;
  color: white;
  transform: translateY(-2px);
}

.btn-load-more {
  background: linear-gradient(135deg, #006064 0%, #004d4f 100%);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-load-more:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 96, 100, 0.4);
}

/* Loading Spinner */
.loading {
  text-align: center;
  padding: 3rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e0f2f1;
  border-top: 4px solid #006064;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.empty-state-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  font-size: 1.2rem;
  color: #64748b;
  background-color: #f8fafc;
  border-radius: 12px;
}

.load-more-container {
  text-align: center;
  margin-bottom: 3rem;
}

/* Project Card */
.project-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 96, 100, 0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 96, 100, 0.12);
}

/*  Thumbnail Styles */
.project-thumbnail {
  height: 220px;
  position: relative;
  overflow: hidden;
}

.project-thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-thumbnail-img {
  transform: scale(1.05);
}

.project-category {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: white;
  z-index: 2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.category-borehole-drilling {
  background: #f59e0b;
}
.category-water-surveys {
  background: blue;
}
.category-maintenance {
  background: orangered;
}
.category-pump-installations {
  background: #10b981;
}
.category-industrial {
  background: #ef4444;
}
.category-agricultural {
  background: green;
}
.project-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.75rem;
}

.project-description {
  color: #64748b;
  margin-bottom: 1.5rem;
  line-height: 1.5;
  flex-grow: 1;
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #475569;
  font-size: 0.9rem;
}

.project-actions {
  display: flex;
  justify-content: center;
  margin-top: auto;
}

.btn-outline {
  background: transparent;
  color: #006064;
  border: 2px solid #006064;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.btn-outline:hover {
  background: #006064;
  color: white;
}

.details-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

.details-modal {
  background-color: white;
  border-radius: 8px;
  width: 100%;
  max-width: 950px;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
}

.details-modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  color: #333;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.details-modal-close:hover {
  transform: scale(1.1);
  background: white;
}

.details-modal-content {
  display: flex;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.details-gallery-container {
  flex: 0 0 60%;
  position: relative;
  background-color: #000;
}

.details-info-container {
  flex: 0 0 40%;
  padding: 2rem;
  overflow-y: auto;
}

.details-info-container h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.details-info-container .meta-item {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  color: #555;
}

.details-info-container p {
  line-height: 1.7;
  color: #333;
}

/* Slideshow inside modal */
.project-slideshow {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.slideshow-inner {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
}

.slide img,
.slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slideshow-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 5;
  opacity: 0;
}

.project-slideshow:hover .slideshow-nav {
  opacity: 1;
}

.slideshow-nav.prev-slide {
  left: 1rem;
}
.slideshow-nav.next-slide {
  right: 1rem;
}

.slideshow-nav:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .filters {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-actions {
    margin-left: 0;
    margin-top: 1rem;
  }
}

@media (max-width: 768px) {
  .page-hero {
    min-height: 350px;
    padding-top: 70px;
    background-attachment: scroll;
  }
  .hero-content {
    padding: 3rem 1rem 2rem;
  }
  .page-title {
    font-size: 2.5rem;
  }
  .page-subtitle {
    font-size: 1.1rem;
  }
  .filters {
    margin: 0 1rem 2rem;
    padding: 1.5rem;
  }
  .filter-actions {
    flex-direction: column;
  }
  .projects-grid {
    padding: 0 1rem;
    grid-template-columns: 1fr;
  }
  .details-modal-content {
    flex-direction: column;
  }
  .details-gallery-container {
    height: 300px;
    flex-shrink: 0;
  }
}
