/**
 * Projects Section - Expanding Cards
 */

.projects-section {
  width: 100%;
  max-width: 100vw;
  padding: 60px 0 40px;
  margin: 0;
  box-sizing: border-box;
  background-color: #fafbfe;
  overflow-x: hidden;
  scroll-margin-top: 80px; /* Account for sticky navbar */
  scroll-padding-top: 80px; /* Account for sticky navbar */
}

#projects {
  scroll-margin-top: 80px; /* Account for sticky navbar */
  scroll-padding-top: 80px; /* Account for sticky navbar */
}

.projects-section-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 0 20px;
}

/* Optima font for English project section headers */
[lang="en"] .projects-section-header h2,
[dir="ltr"] .projects-section-header h2,
.ltr .projects-section-header h2 {
  font-family: "Optima LT W02 Roman", "Optima", sans-serif;
  text-transform: uppercase;
}

.projects-section-title {
  font-family: "Noto Sans Hebrew", "Open Sans", sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  margin: 0;
  padding: 0;
  text-align: center;
}

/* Optima font for English project section titles */
[lang="en"] .projects-section-title,
[dir="ltr"] .projects-section-title,
.ltr .projects-section-title {
  font-family: "Optima LT W02 Roman", "Optima", sans-serif;
  text-transform: uppercase;
}

.projects-section-footer {
  margin-top: 40px;
  padding: 0 20px;
}

.projects-divider-line {
  position: relative;
  width: 100%;
  padding: 20px 0;
  overflow: hidden;
}

.projects-divider-line::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #0063AD;
  z-index: 0;
  margin: 0 5px;
}

.projects-link {
  position: relative;
  display: inline-block;
  font-family: "Noto Sans Hebrew", "Open Sans", sans-serif;
  font-size: 1.2rem;
  font-weight: 300;
  color: white;
  text-decoration: none;
  transition: all 0.8s ease;
  white-space: nowrap;
  padding: 10px 30px;
  z-index: 1;
  background-color: #0063AD;
  border-radius: 99px;
  margin: 0 5px;
}

.projects-link:hover {
  background-color: #004a7a;
}

.projects-container {
  display: flex;
  width: 100%;
  max-width: 100vw;
  height: 70vh;
  min-height: 500px;
  gap: 0;
  position: relative;
  overflow: hidden;
  padding: 0;
  margin: 0;
}

.project-card {
  position: relative;
  flex: 1;
  height: 100%;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  outline: none;
}

.project-card:hover,
.project-card:focus-within {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.project-card:focus-visible {
  outline: 3px solid #0063AD;
  outline-offset: 2px;
}

/* Inner image for zoom effect */
.project-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: inherit;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

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

/* Background images for each project type */
.project-card[data-project="commercial"] {
  background-image: url('../images/projects/achva/thumb.webp');
}

.project-card[data-project="urban"] {
  background-image: url('../images/projects/geolim/01.webp');
}

.project-card[data-project="hospitality"] {
    background-image: url('../images/projects/heler/01.jpg');
}

.project-card[data-project="residential"] {
  background-image: url('../images/projects/shoafat/thumb.webp');
}

/* Hover and focus effect - expand the hovered/focused card */
.project-card:hover,
.project-card:focus-within {
  flex: 2.5;
  transition: flex 0.8s ease;
}

/* Gradient overlay */
.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.3) 40%,
    rgba(0, 0, 0, 0.7) 100%
  );
  transition: all 0.5s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 30px;
  z-index: 1;
}

.project-card:hover .project-overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.4) 40%,
    rgba(0, 0, 0, 0.75) 100%
  );
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* Project title styling */
.project-title {
  font-family: "Noto Sans Hebrew", "Open Sans", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff;
  text-align: center;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
  margin: 0 0 15px 0;
  padding: 12px 24px;
  background: rgba(0, 99, 173, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.5s ease;
  white-space: nowrap;
  position: relative;
  z-index: 2;
}

.project-card:hover .project-title {
  font-size: 1.2rem;
  background: rgba(0, 99, 173, 0.95);
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 99, 173, 0.4);
}

/* View Project Button */
.project-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.95);
  color: #0063AD;
  font-family: "Noto Sans Hebrew", "Open Sans", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 25px;
  transition: all 0.8s ease;
  opacity: 0;
  transform: translateY(20px);
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.project-card:hover .project-view-btn {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

.project-view-btn:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.project-view-btn-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.project-view-btn:hover .project-view-btn-icon {
  transform: translateX(3px);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .projects-section-title {
    font-size: 2rem;
  }
  
  .project-title {
    font-size: 0.8rem;
    padding: 15px 20px;
  }
  
  .project-card:hover .project-title {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .projects-section {
    padding: 40px 0 30px;
  }
  
  .projects-section-header {
    margin-bottom: 30px;
  }
  
  .projects-section-title {
    font-size: 1.8rem;
  }
  
  .projects-container {
    flex-direction: column;
    height: auto;
    min-height: auto;
    gap: 0;
    padding: 0;
  }
  
  .project-card {
    flex: none !important;
    height: 250px;
    width: 100%;
  }
  
  .project-card:hover {
    flex: none !important;
    transform: translateY(0);
  }
  
  .project-card::after {
    transform: none;
  }
  
  .project-card:hover::after {
    transform: scale(1.03);
  }
  
  .project-title {
    font-size: 1.2rem;
    white-space: normal;
    padding: 10px 16px;
    margin-bottom: 10px;
  }
  
  .project-card:hover .project-title {
    font-size: 1.3rem;
    transform: translateY(0);
  }
  
  .project-view-btn {
    display: none;
  }
  
  .projects-section-footer {
    margin-top: 30px;
  }
  
  .projects-link {
    font-size: 1rem;
    padding: 8px 25px;
  }
}

@media (max-width: 480px) {
  .projects-section {
    padding: 30px 0 20px;
  }
  
  .projects-section-title {
    font-size: 1.5rem;
  }
  
  .projects-container {
    gap: 0;
    padding: 0;
  }
  
  .project-card {
    height: 220px;
  }
  
  .project-title {
    font-size: 1.1rem;
    padding: 8px 14px;
    margin-bottom: 8px;
    border-radius: 8px;
  }
  
  .project-card:hover .project-title {
    font-size: 1.2rem;
  }
  
  .project-view-btn {
    display: none;
  }
  
  .projects-link {
    font-size: 0.95rem;
    padding: 8px 20px;
  }
}

