/*Anasayfa Proje Cardları Bölümü*/
/* Projeler Bölümü */
.projects-section {
  padding: 40px 0;
  background: var(--blue-gradient); /*background-color: var(--light-color)*/
}

.projects-section h1 {
  margin-top: 130px;
  color: var(--light-color);
  text-align: center;
}

.projects-section h2 {
  color: var(--light-color);
}

.projects-page h2 {
  margin-top: 60px;
  font-size: xx-large;
  color: var(--primary-color);
  text-align: center;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

/* Proje Kartı */
.project-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Proje Resimleri */
.project-carousel {
  border: 1px dotted var(--primary-color);
  background-color: var(--dark-color);
  position: relative;
  height: 200px;
  overflow: hidden;
}

.project-carousel img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.5s ease;
}

.project-carousel img.hidden {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

.project-card:hover .project-carousel img:first-child {
  opacity: 0.7;
}

.project-card:hover .project-carousel img.hidden {
  opacity: 1;
}

/* Proje İçeriği */
.project-content {
  padding: 20px;
  background-color: var(--light-color);
}

.project-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: var(--secondary-color);
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  z-index: 2;
}

.project-content h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 14px;
  color: var(--text-light);
}

.project-meta i {
  margin-right: 5px;
  color: var(--secondary-color);
}

.project-description {
  color: var(--text-color);
  border: 1px dotted var(--primary-color);
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-meta .meta-item {
  background-color: var(--primary-color);
  color: white;
}

/* Teknoloji Etiketleri */
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
  margin-bottom: 20px;
}

.tech-badge {
  background-color: rgba(29, 54, 97, 0.1);
  color: var(--primary-color);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
}

/* Buton */
.btn-outline {
  display: inline-block;
  padding: 8px 20px;
  border: 2px solid var(--primary-color);
  background-color: transparent;
  color: var(--primary-color);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Responsive Tasarım */
@media (max-width: 768px) {
  .projects-page h2 {
    margin-top: 140px;
    font-size: xx-large;
    color: var(--light-color);
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-meta {
    flex-direction: column;
    gap: 8px;
  }
}

/* Proje Detay Sayfası Stilleri */
.project-detail {
  padding: 90px 0;
  color: var(--text-color);
  /*background-color: var(--light-color);*/
  background: var(--callout-gradient);
}

.project-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(29, 54, 97, 0.1);
}

.project-header h1 {
  color: white;
  margin-top: 10px;
  margin-bottom: 15px;
  font-size: 2.5rem;
  /*background: var(--blue-gradient);*/
  -webkit-background-clip: text;
  /*-webkit-text-fill-color: transparent;*/
}

.project-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.project-meta span {
  display: flex;
  align-items: center;
  background: var(--primary-color); /*rgba(29, 54, 97, 0.05)*/
  padding: 8px 15px;
  border-radius: 30px;
  font-size: 0.9rem;
  color: white; /*var(--text-light)*/
  border: 1px solid rgba(29, 54, 97, 0.1);
}

.project-meta i {
  margin-right: 8px;
  color: var(--secondary-color);
}

/* Proje Galerisi */
.project-gallery {
  position: relative;
  margin: 40px 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(29, 54, 97, 0.1);
}

.hidden {
  display: none;
}

.gallery-main {
  height: 500px;
  overflow: hidden;
  background-color: var(--dark-color);
  position: relative;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.gallery-thumbnails {
  display: flex;
  overflow-x: auto;
  padding: 15px;
  background: var(--callout-gradient); /* rgba(29, 54, 97, 0.03)*/
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) rgba(29, 54, 97, 0.1);
}

.gallery-thumbnails::-webkit-scrollbar {
  height: 6px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 3px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
  background: rgba(29, 54, 97, 0.1);
}

.gallery-thumbnail {
  width: 80px;
  height: 80px;
  margin-right: 10px;
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  background-color: white;
}

.gallery-thumbnail:hover,
.gallery-thumbnail.active {
  border: 2px solid var(--secondary-color);
  border-color: var(--secondary-color);
  transform: scale(1.05);
}

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

/* Proje İçerik Bölümü */
.project-description {
  max-width: 800px;
  margin: 0 auto;
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);

  display: flex;
  flex-direction: column;

  height: auto; /* Varsa sabit height'ı override eder */
  min-height: fit-content; /* İçeriğe göre minimum yükseklik */
  overflow: visible; /* İçerik taşmasını engelleme */
}

.project-description h2 {
  color: var(--primary-color);
  margin: 30px 0 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
  clear: both;
}

.project-description p {
  line-height: 1.8;
  color: var(--text-color);
}

/* Teknoloji Stack */
.tech-stack {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 20px;
  margin: 30px 0;
  /* Ekleme: */
  clear: both;
}

.tech-item {
  text-align: center;
  padding: 15px;
  border-radius: 8px;
  background: white;
  transition: all 0.3s ease;
  border: 1px solid rgba(29, 54, 97, 0.1);
}

.tech-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--accent-color);
}

.tech-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 10px;
}

.tech-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tech-name {
  font-weight: 600;
  color: var(--primary-color);
}

/* Zaman Çizelgesi */
.project-timeline {
  position: relative;
  padding-left: 30px;
  margin: 40px 0;
  /* Ekleme: */
  clear: both;
}

.project-timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--blue-gradient);
}

.timeline-item {
  position: relative;
  padding-bottom: 30px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-date {
  position: absolute;
  left: -30px;
  top: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-color);
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--secondary-color);
}

.timeline-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
  margin-left: 20px;
  border: 1px solid rgba(29, 54, 97, 0.1);
}

.timeline-content h3 {
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.timeline-content p {
  color: var(--text-light);
  margin: 0;
}

/* Geri Dön Butonu */
.back-button {
  display: inline-flex;
  align-items: center;
  margin-top: 40px;
  padding: 12px 25px;
  background: var(--primary-color);
  color: white;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  box-shadow: 0 4px 6px rgba(29, 54, 97, 0.1);
  border: none;
  cursor: pointer;
}

.back-button i {
  margin-right: 8px;
}

.back-button:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(204, 19, 4, 0.2);
}

/* Responsive Tasarım */
@media (max-width: 768px) {
  .project-header h1 {
    margin-top: 70px;
    font-size: 2rem;
  }

  .project-meta {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .gallery-main {
    height: 300px;
  }

  .tech-stack {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .project-timeline {
    padding-left: 20px;
  }

  .timeline-content {
    margin-left: 15px;
  }

  .project-description {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .project-detail {
    margin-top: 100px;
    padding: 30px 0;
  }

  .gallery-main {
    height: 250px;
  }

  .tech-stack {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
  }

  .tech-icon {
    width: 40px;
    height: 40px;
  }

  .back-button {
    width: 100%;
    justify-content: center;
  }
}
