/* Projects Page Styles */
.content.projects {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.content.projects h1 {
  font-size: 3rem;
  font-weight: 700;
  color: #363739;
  margin-bottom: 1rem;
  text-align: center;
}

.content.projects .intro-text {
  font-size: 1.2rem;
  color: #666;
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

/* Projects Showcase */
.projects-showcase {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  margin-bottom: 4rem;
}

.project-item {
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

.project-item.featured {
  grid-template-columns: 1.2fr 0.8fr;
}

/* Project Gallery */
.project-gallery {
  position: relative;
  overflow: hidden;
}

.project-images {
  display: grid;
  gap: 8px;
  height: 400px;
}

.project-images.grid-2x2 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.project-images.grid-2x2 .project-image.main {
  grid-row: 1 / 3;
}

.project-images.grid-1x3 {
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.project-images.grid-1x3 .project-image.main {
  grid-row: 1 / 3;
}

.project-images.single {
  grid-template-columns: 1fr;
}

.project-image {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #f8f9fa;
}

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

.project-img-clickable {
  cursor: pointer;
}

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

/* Project Info */
.project-info {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-header {
  margin-bottom: 1.5rem;
}

.project-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: #363739;
  margin: 0 0 0.5rem 0;
}

.project-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: #ff9100;
  font-weight: 600;
}

.project-meta span {
  position: relative;
}

.project-meta span:not(:last-child)::after {
  content: "•";
  margin-left: 1rem;
  color: #ccc;
}

.project-description {
  line-height: 1.7;
  color: #555;
}

.project-description p {
  margin: 0 0 1rem 0;
  font-size: 1rem;
}

.project-description p:last-child {
  margin-bottom: 0;
}

/* Project CTA */
.project-cta {
  background: linear-gradient(135deg, #ff9100 0%, #ffb347 100%);
  border-radius: 16px;
  padding: 3rem 2rem;
  text-align: center;
  margin: 3rem 0;
}

.project-cta h2 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.project-cta p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.project-cta .btn {
  background: #fff;
  color: #ff9100;
  padding: 16px 40px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
  justify-content: center;
}

.project-cta .btn:hover {
  background: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .content.projects {
    padding: 0 15px;
  }
  
  .content.projects h1 {
    font-size: 2.2rem;
  }
  
  .project-item {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .project-item.featured {
    grid-template-columns: 1fr;
  }
  
  .project-images {
    height: 250px;
  }
  
  .project-images.grid-2x2 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
  }
  
  .project-images.grid-2x2 .project-image.main {
    grid-row: 1;
  }
  
  .project-images.grid-2x2 .project-image.secondary:nth-child(n+3) {
    display: none;
  }
  
  .project-images.grid-1x3 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
  }
  
  .project-images.grid-1x3 .project-image.main {
    grid-row: 1;
  }
  
  .project-images.grid-1x3 .project-image.secondary:nth-child(n+3) {
    display: none;
  }
  
  .project-info {
    padding: 1.5rem;
  }
  
  .project-title {
    font-size: 1.8rem;
  }
  
  .project-cta {
    padding: 2rem 1.5rem;
  }
  
  .project-cta h2 {
    font-size: 1.6rem;
  }
  
  .project-cta .btn {
    width: 100%;
    max-width: 300px;
    padding: 18px 30px;
    font-size: 1.05rem;
  }
}

@media (max-width: 480px) {
  .projects-showcase {
    gap: 2rem;
  }
  
  .project-images {
    height: 200px;
  }
  
  .project-images.grid-2x2,
  .project-images.grid-1x3 {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }
  
  .project-images.grid-2x2 .project-image.secondary,
  .project-images.grid-1x3 .project-image.secondary {
    display: none;
  }
}

/* Image Modal Styles */
.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-modal.active {
  display: flex;
  opacity: 1;
  visibility: visible;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.modal-content {
  position: relative;
  max-width: 800px;
  width: 90%;
  background: #fff;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.8);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.image-modal.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  z-index: 1001;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  transition: background 0.3s ease;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.7);
}

.modal-image-container {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-image {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
}

/* Mobile Modal Styles */
@media (max-width: 768px) {
  .modal-content {
    width: 90%;
    max-width: none;
    margin: 20px;
  }
  
  .modal-close {
    top: 10px;
    right: 15px;
    font-size: 24px;
    width: 36px;
    height: 36px;
  }
  
  .modal-image {
    max-height: 70vh;
  }
}

@media (max-width: 480px) {
  .modal-content {
    width: 95%;
    margin: 10px;
  }
  
  .modal-image {
    max-height: 60vh;
  }
}