/* Projects Gallery Section - Homepage styling */
.projects-gallery-section {
  padding: 120px 0 100px;
  background: #fafafa;
}

/* When inside content container (archive/projects pages) */
.projects-content-container .projects-gallery-section {
  padding: 0 0 80px;
  background: transparent;
}

.projects-gallery-section .section-header {
  text-align: center;
  margin-bottom: 60px;
}

.projects-gallery-section .section-title {
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 4rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}

.projects-gallery-section .section-title::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    color-mix(in srgb, var(--secondary-color) 80%, black)
  );
  border-radius: 2px;
}

.projects-gallery-section .section-subtitle {
  font-size: 18px;
  color: #666;
  max-width: 600px;
  margin: -2.5rem auto 3rem;
  text-align: center;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.project-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Project Image Wrapper */
.project-image-wrapper {
  position: relative;
  height: 280px;
  overflow: hidden;
  background: #f5f5f5;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

.project-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

/* Project Overlay */
.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 53, 113, 0.7) 0%,
    rgba(0, 42, 90, 0.9) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-hover-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 20px;
  text-align: center;
}

.project-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: auto 0;
}

.project-view-btn,
.project-zoom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-color, #003571);
  border: none;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.project-view-btn:hover,
.project-zoom-btn:hover {
  background: white;
  color: var(--primary-color, #003571);
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.project-view-btn svg,
.project-zoom-btn svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

.project-title {
  color: white;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.project-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
  max-width: 100%;
}

.project-stat {
  color: white;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}

.project-stat .stat-label {
  font-size: 9px;
  font-weight: 400;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-stat .stat-value {
  font-size: 11px;
  font-weight: 600;
}

.project-capacity .stat-value {
  font-size: 12px;
  font-weight: 700;
}

.project-productivity .stat-value {
  font-size: 11px;
  font-weight: 600;
}

.project-savings .stat-value {
  font-size: 10px;
  font-weight: 500;
}

/* Projects Footer */
.projects-footer {
  text-align: center;
  margin-top: 50px;
}

.view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: var(--primary-color);
  color: var(--white);
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(0, 53, 113, 0.3);
}

.view-all-btn:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 53, 113, 0.4);
}

.view-all-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

/* Projects Archive Content */
.projects-archive-content {
  background: #f8f9fa;
  padding: 60px 0;
}

/* No Projects Found & No Results Found */
.no-projects-found,
.no-results-found {
  text-align: center;
  padding: 80px 20px;
  background: var(--white);
  border-radius: 16px;
  margin: 40px 0;
  border: 1px solid var(--border-color);
}

.no-projects-icon,
.no-results-icon {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--text-light);
  opacity: 0.6;
}

.no-projects-title,
.no-results-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0 0 16px 0;
}

.no-projects-message,
.no-results-message {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto;
}

/* Projects Section Responsive Design */
@media (max-width: 1024px) {
  .projects-gallery-section {
    padding: 100px 0 80px;
  }

  .projects-gallery-section .section-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .projects-gallery-section {
    padding: 80px 0 60px;
  }

  .projects-gallery-section .section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
  }

  .projects-gallery-section .section-subtitle {
    margin: -2rem auto 2rem;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .projects-gallery-section {
    padding: 60px 0 40px;
  }

  .projects-gallery-section .section-title {
    font-size: 1.75rem;
  }
}

/* Modal Responsive Design */
@media (max-width: 1024px) {
  .modal-content {
    width: 95%;
    height: 90vh;
  }

  .modal-gallery {
    padding: 15px;
  }
}

@media (max-width: 768px) {
  .modal-content {
    width: 98%;
    height: 95vh;
    top: 2.5vh;
  }

  .modal-gallery {
    padding: 10px;
  }

  .gallery-main {
    margin-bottom: 15px;
  }

  .gallery-nav {
    width: 40px;
    height: 40px;
  }

  .gallery-nav svg {
    width: 20px;
    height: 20px;
  }

  .gallery-thumbs {
    gap: 8px;
    height: 100px;
    min-height: 100px;
    padding: 8px 0;
  }

  .gallery-thumb {
    width: 80px;
    height: 60px;
  }

  /* Mobile styles for no projects/results */
  .no-projects-found,
  .no-results-found {
    padding: 60px 16px;
    margin: 30px 0;
  }

  .no-projects-icon svg,
  .no-results-icon svg {
    width: 60px;
    height: 60px;
  }

  .no-projects-title,
  .no-results-title {
    font-size: 1.3rem;
  }

  .no-projects-message,
  .no-results-message {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .modal-close {
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
  }

  .modal-close svg {
    width: 20px;
    height: 20px;
  }

  .gallery-main {
    min-height: 180px;
  }

  .gallery-nav {
    width: 35px;
    height: 35px;
  }

  .gallery-nav svg {
    width: 18px;
    height: 18px;
  }

  .gallery-prev {
    left: 10px;
  }

  .gallery-next {
    right: 10px;
  }

  .gallery-thumbs {
    max-height: 80px;
    gap: 6px;
  }

  .gallery-thumb {
    width: 70px;
    height: 50px;
  }
}

/* Project Zoom Modal */
.project-zoom-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
}

.project-zoom-modal.active {
  display: block;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.modal-content {
  position: fixed;
  top: 5vh;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  height: 90vh;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  background: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.modal-close:hover {
  transform: scale(1.1);
}

.modal-close svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

/* Gallery */
.modal-gallery {
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 20px;
}

.gallery-main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #f5f5f5;
  border-radius: 8px;
}

.gallery-image-wrapper {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 10px;
}

.gallery-main-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 5;
}

.gallery-nav:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.gallery-nav svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

.gallery-prev {
  left: 20px;
}

.gallery-next {
  right: 20px;
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0;
  flex-shrink: 0;
  height: 120px;
  min-height: 120px;
}

.gallery-thumb {
  flex-shrink: 0;
  width: 100px;
  height: 80px;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-thumb.active {
  border-color: #4caf50;
}

.gallery-thumb:hover {
  transform: scale(1.05);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Modal Responsive Design */
@media (max-height: 700px) {
  .modal-content {
    height: 95vh;
    top: 2.5vh;
  }

  .modal-gallery {
    padding: 15px;
    gap: 15px;
  }

  .gallery-thumbs {
    height: 100px;
    min-height: 100px;
  }

  .gallery-thumb {
    width: 80px;
    height: 60px;
  }
}

@media (max-height: 600px) {
  .modal-content {
    height: 98vh;
    top: 1vh;
  }

  .modal-gallery {
    padding: 10px;
    gap: 10px;
  }

  .gallery-thumbs {
    height: 80px;
    min-height: 80px;
  }

  .gallery-thumb {
    width: 70px;
    height: 50px;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
  }

  .modal-close svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 768px) {
  .modal-content {
    width: 95%;
  }

  .modal-gallery {
    padding: 15px;
  }

  .gallery-nav {
    width: 40px;
    height: 40px;
  }

  .gallery-nav svg {
    width: 20px;
    height: 20px;
  }

  .gallery-prev {
    left: 10px;
  }

  .gallery-next {
    right: 10px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    width: 100%;
    height: 100vh;
    top: 0;
    border-radius: 0;
  }

  .modal-gallery {
    padding: 10px;
    gap: 10px;
  }

  .gallery-thumbs {
    height: 70px;
    min-height: 70px;
    gap: 5px;
  }

  .gallery-thumb {
    width: 60px;
    height: 45px;
  }

  .gallery-nav {
    width: 35px;
    height: 35px;
  }

  .gallery-nav svg {
    width: 18px;
    height: 18px;
  }

  .gallery-prev {
    left: 5px;
  }

  .gallery-next {
    right: 5px;
  }
}

/* Projects Archive Header - Separate Hero Section */
.projects-archive-header {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  padding: 120px 0 80px;
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.projects-archive-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.6;
}

.projects-archive-header .container {
  position: relative;
  z-index: 2;
}

.projects-archive-header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--white);
}

.projects-archive-header p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Projects Content Container - Filter Bar + Cards */
.projects-content-container {
  background: var(--gray-lighter);
  border-radius: 20px;
  max-width: 1340px;
  margin: 40px auto;
  overflow: hidden;
}

/* Filter Bar - Part of content container */
.projects-filter-bar {
  padding: 40px 0;
  background: transparent;
}

/* New Filter Bar Design */
.filter-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

/* Filter Groups */
.filter-groups {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-group-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 4px;
  width: fit-content;
}

.filter-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* New Filter Button Style */
.filter-btn {
  padding: 8px 16px;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 25px;
  color: var(--text-dark);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-family: var(--font-primary);
}

.filter-btn:hover {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 53, 113, 0.15);
}

.filter-btn.active {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 53, 113, 0.25);
}

/* Filter Actions */
.filter-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-end;
}

/* New Search Bar Design */
.projects-search {
  position: relative;
  width: 280px;
}

.projects-search input {
  width: 100%;
  padding: 12px 16px 12px 45px;
  border: 1px solid var(--border-color);
  border-radius: 25px;
  font-size: 0.9rem;
  font-family: var(--font-primary);
  transition: all 0.3s ease;
  background: var(--white);
}

.projects-search input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 53, 113, 0.1);
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

.projects-search input:focus + .search-icon {
  color: var(--primary-color);
}

/* Projects Count */
.projects-count {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
  white-space: nowrap;
  background: var(--white);
  padding: 8px 16px;
  border-radius: 15px;
  border: 1px solid var(--border-color);
}

/* Responsive Filter Bar */
@media (max-width: 1024px) {
  .filter-container {
    flex-direction: column;
    gap: 30px;
  }

  .filter-groups {
    gap: 30px;
  }

  .filter-actions {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }

  .projects-search {
    width: 250px;
  }
}

@media (max-width: 768px) {
  .filter-groups {
    gap: 20px;
  }

  .filter-group {
    gap: 12px;
  }

  .filter-group-title {
    font-size: 0.9rem;
  }

  .filter-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .filter-actions {
    flex-direction: column;
    gap: 12px;
  }

  .projects-search {
    width: 100%;
    max-width: 300px;
  }

  .projects-count {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .filter-groups {
    flex-direction: column;
    gap: 16px;
  }

  .filter-group {
    gap: 10px;
  }

  .filter-buttons {
    gap: 6px;
  }

  .filter-btn {
    padding: 5px 10px;
    font-size: 0.75rem;
  }

  .projects-search input {
    padding: 10px 12px 10px 40px;
    font-size: 0.85rem;
  }

  .search-icon {
    left: 12px;
    width: 16px;
    height: 16px;
  }
}
