/* ============================================================
   PROGRAMCILAR.CSS - Programcılar Bölümü
   ------------------------------------------------------------
   Bu dosya, programcılar bölümünün kitap/flip animasyonu,
   beğen butonu, scrollbar ve responsive stillerini içerir.
   ============================================================ */

/* ============================================================
   1. KİTAP KONTEYNERİ VE KİTAP
   ============================================================ */
.book-container {
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid #ffd277;
  border-radius: 12px;
  overflow: hidden;
}

.book {
  position: relative;
  border-radius: 8px;
  width: 287px;
  height: 347px;
  background-color: #1f2937;
  box-shadow: 1px 1px 12px #000;
  transform: preserve-3d;
  perspective: 2000px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  cursor: pointer;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

/* Kitap gölgesi */
.book::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 8px;
  right: 8px;
  height: 15px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  filter: blur(8px);
  z-index: -1;
  transition: all 0.3s ease;
}

.book:hover::after {
  bottom: -10px;
  left: 10px;
  right: 6px;
  height: 18px;
}

/* ============================================================
   2. KAPAK (COVER) VE İÇERİK
   ============================================================ */
.cover {
  top: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.5s;
  transform-origin: 0;
  display: flex;
  overflow: hidden;
}

.cover-image {
  width: 100%;
  height: 100%;
  object-fit: unset;
  filter: brightness(0.9) contrast(1);
}

.cover-text {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  padding: 20px 15px 60px 15px;
  box-sizing: border-box;
}

/* Kitap hover durumunda kapağın açılma animasyonu */
.book:hover .cover {
  transform: rotatey(-80deg);
}

/* ============================================================
   3. PROGRAMCI BUTONU (Program adı)
   ============================================================ */
.programci_btn {
  width: 200px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(to right, #77530a, #ffd277, #77530a, #77530a, #ffd277, #77530a);
  background-size: 250%;
  background-position: 0%;
  color: #ffd277;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  font-weight: bold;
  animation: bgMove 5s linear infinite;
  top: 33px;
}

.programci_btn::before {
  position: absolute;
  content: attr(data-text);
  color: #ffd277;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 97%;
  height: 90%;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.842);
}

.programci_btn:active {
  transform: scale(0.95);
}

@keyframes bgMove {
  0% {
    background-position: 0%;
  }
  50% {
    background-position: 100%;
  }
  100% {
    background-position: 0%;
  }
}

/* ============================================================
   4. OK İŞARETİ (ARROW INDICATOR)
   ============================================================ */
.arrow-indicator {
  position: absolute;
  bottom: 15px;
  right: 15px;
  animation: bounce 2s infinite;
  transform: rotate(-60deg);
  z-index: 10;
}

.arrow-indicator svg {
  width: 32px;
  height: 32px;
  filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.7));
}

.arrow-indicator svg path {
  stroke-width: 3;
}

.cover:hover .arrow-indicator svg {
  stroke-width: 4;
  filter: drop-shadow(3px 3px 4px rgba(0, 0, 0, 0.8));
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: rotate(-60deg) translateY(0);
  }
  40% {
    transform: rotate(-60deg) translateY(-8px);
  }
  60% {
    transform: rotate(-60deg) translateY(-4px);
  }
}

/* ============================================================
   5. KİTAP İÇERİĞİ (BOOK CONTENT)
   ============================================================ */
.book-content {
  padding: 15px 12px;
  width: 100%;
  height: 100%;
  background: #1f2937;
  border-radius: 8px;
  color: white;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.program-details {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ============================================================
   6. DETAY İÇERİĞİ (DETAILS CONTENT)
   ============================================================ */
.details-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  overflow-y: auto;
  max-height: 260px;
  padding-right: 5px;
  width: 100%;
}

.detail-item {
  margin-bottom: 0;
  color: #fef3c7;
  font-size: 13px;
  line-height: 1.3;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 5px;
  width: 100%;
}

.detail-item.centered {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}

.detail-section {
  margin-bottom: 6px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.detail-section.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}

.detail-title {
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 3px;
  font-size: 13px;
  text-align: center;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  width: 100%;
}

.detail-content {
  color: #fef3c7;
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
  word-wrap: break-word;
  white-space: normal;
  padding: 0 8px;
  width: 100%;
}

.detail-content.multi-line {
  display: block;
  text-align: center;
  word-wrap: break-word;
  white-space: normal;
  line-height: 1.2;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 85%;
  margin: 0 auto;
}

.text-bold {
  font-weight: 700;
}

/* ============================================================
   7. İKONLAR
   ============================================================ */
.icon {
  width: 14px;
  height: 14px;
  color: #ef4444;
  flex-shrink: 0;
}

/* ============================================================
   8. CUSTOM SCROLLBAR
   ============================================================ */
.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: #f59e0b #1f2937;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #1f2937;
  border-radius: 4px;
  margin: 4px 0;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #f59e0b;
  border-radius: 4px;
  border: 2px solid #1f2937;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #d97706;
}

/* ============================================================
   9. BEĞEN BUTONU
   ============================================================ */
.heart-checkbox {
  display: none;
}

.like-button-container {
  position: relative;
  cursor: pointer;
  display: flex;
  height: 36px;
  width: 110px;
  border-radius: 10px;
  border: none;
  background-color: #1d1d1d;
  overflow: hidden;
  box-shadow: inset -2px -2px 5px rgba(255, 255, 255, 0.2),
    inset 2px 2px 5px rgba(0, 0, 0, 0.1),
    4px 4px 10px rgba(0, 0, 0, 0.4),
    -2px -2px 8px rgba(255, 255, 255, 0.1);
  margin: 0 auto;
}

.like {
  width: 70%;
  height: 100%;
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: space-evenly;
}

.like-icon {
  fill: #505050;
  height: 18px;
  width: 18px;
  transition: transform 0.3s ease;
}

.like-text {
  color: #fcfcfc;
  font-size: 12px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.like-count {
  position: absolute;
  right: 0;
  width: 30%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #717070;
  font-size: 12px;
  border-left: 2px solid #4e4e4e;
  transition: all 0.5s ease-out;
  font-weight: bold;
  min-width: 20px;
  text-align: center;
}

.like-count.two {
  transform: translateY(40px);
}

.heart-checkbox:checked~.like .like-icon {
  fill: #fc4e4e;
  animation: enlarge 0.2s ease-out 1;
  transition: all 0.2s ease-out;
}

.heart-checkbox:checked~.like-count.two {
  transform: translateX(0);
  color: #fcfcfc;
}

.heart-checkbox:checked~.like-count.one {
  transform: translateY(-40px);
}

@keyframes enlarge {
  0% {
    transform: scale(0.5);
  }
  100% {
    transform: scale(1.2);
  }
}

@keyframes heartBeat {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

/* ============================================================
   10. RESPONSIVE - MOBİL (480px ve altı)
   ============================================================ */
@media (max-width: 480px) {
  .grid {
    justify-items: center;
  }

  .book {
    width: 280px;
    height: 340px;
  }

  .program-title-bottom {
    font-size: 18px;
    padding: 10px 12px;
    bottom: 45px;
    width: 85%;
  }

  .detail-item {
    font-size: 12px;
  }

  .detail-title {
    font-size: 12px;
  }

  .detail-content {
    font-size: 11px;
  }

  .details-content {
    max-height: 240px;
    gap: 6px;
  }

  .like-button-container {
    height: 32px;
    width: 100px;
  }

  .like-text {
    font-size: 11px;
  }

  .like-count {
    font-size: 11px;
  }

  .like-icon {
    height: 16px;
    width: 16px;
  }
}

/* ============================================================
   11. RESPONSIVE - KÜÇÜK EKRAN (481px - 640px)
   ============================================================ */
@media (max-width: 640px) and (min-width: 481px) {
  .book {
    width: 260px;
    height: 320px;
  }

  .details-content {
    max-height: 220px;
  }
}

/* ============================================================
   12. RESPONSIVE - TABLET (641px - 768px)
   ============================================================ */
@media (max-width: 768px) and (min-width: 641px) {
  .book {
    width: 240px;
    height: 300px;
  }

  .details-content {
    max-height: 200px;
  }
}

/* ============================================================
   13. TOUCH DEVICE OPTİMİZASYONU
   ============================================================ */
@media (hover: none) {
  .book {
    cursor: pointer;
  }

  .book:active .cover {
    transform: rotatey(-80deg);
  }
}
/* Beğen butonu (buton elementi) */
.like-button {
  background: transparent;
  border-radius: 5px;
  padding: 8px 8px;
  color: #ef4444;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  font-weight: bold;
  border: none;
}

.like-button:hover {
  transform: scale(1.05);
}

.like-button:active {
  transform: scale(0.95);
}

.like-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.like-button.liked {
  background: #ef4444;
  color: white;
}

.like-button.liked .like-icon {
  fill: white;
  animation: heartBeat 0.5s ease;
}