/* ============================================================
   INDEX.PHP - ÖZEL STİLLER
   ============================================================ */

/* ===== KATEGORİ (KİTAP KARTLARI) ===== */
.book {
  position: relative;
  border-radius: 10px;
  width: 100%;
  aspect-ratio: 280 / 380;
  background-color: var(--card-bg, #f5f5f5);
  -webkit-box-shadow: 1px 1px 12px rgba(0, 0, 0, 0.15);
  box-shadow: 1px 1px 12px rgba(0, 0, 0, 0.15);
  -webkit-transform: preserve-3d;
  -ms-transform: preserve-3d;
  transform: preserve-3d;
  -webkit-perspective: 2000px;
  perspective: 2000px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  color: #000;
  cursor: default;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 0 auto;
  overflow: hidden;
}

.book:hover {
  transform: translateY(-5px);
  box-shadow: 1px 1px 20px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .book {
  background-color: var(--card-bg, #1a1a2e);
  box-shadow: 1px 1px 12px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .book:hover {
  box-shadow: 1px 1px 20px rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] {
  --card-bg: #295843;
}

.book[data-filter] {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

[data-theme="dark"] .book[data-filter] {
  background-color: var(--card-bg, #1a1a2e);
}

/* ÖN KAPAK (COVER) */
.cover {
  top: 0;
  left: 0;
  position: absolute;
  background-color: #1a1a2e;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  cursor: pointer;
  -webkit-transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-transform-origin: 0;
  -ms-transform-origin: 0;
  transform-origin: 0;
  -webkit-box-shadow: 1px 1px 12px rgba(0, 0, 0, 0.2);
  box-shadow: 1px 1px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('../images/elif_vav_10.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #1a1a2e;
  z-index: 2;
}

.cover p {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  font-weight: 700;
  color: white;
  background: rgba(0, 0, 0, 0.6);
  padding: 10px 18px;
  border-radius: 12px;
  backdrop-filter: blur(3px);
  text-align: center;
  max-width: 90%;
  line-height: 1.3;
  margin: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  z-index: 3;
}

[data-theme="dark"] .cover p {
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.15);
}

/* OKU BUTONU */
.read-btn {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: white;
  padding: 12px 26px;
  border-radius: 30px;
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.6);
  letter-spacing: 1px;
  z-index: 1;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  pointer-events: auto;
}

.read-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateX(-50%) scale(1.05);
  border-color: white;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .read-btn {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .read-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.7);
}

/* KİTAP ALT BİLGİ */
.book-info {
  text-align: center;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.book-info .book-author {
  font-size: 11px;
  color: var(--text-muted, #888);
  letter-spacing: 0.5px;
  font-weight: 400;
  transition: color 0.3s ease;
}

.book-info .book-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--heading-color, #2c2c2c);
  letter-spacing: 0.3px;
  transition: color 0.3s ease;
}

[data-theme="dark"] .book-info .book-author {
  color: var(--text-muted, #a0a0a0);
}

[data-theme="dark"] .book-info .book-title {
  color: var(--heading-color, #f0f0f0);
}

/* TÜM MAKALELER BUTONU */
.btn-all-articles {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 40px;
  background: linear-gradient(93deg, #2aa9a0fa 0%, #3e7933 100%);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.3);
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.btn-all-articles:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 35px rgba(201, 168, 76, 0.4);
  background: linear-gradient(109deg, #2e938cfa 0% 0%, #f39b15 100%);
}

.btn-all-articles:active {
  transform: translateY(0px);
}

.btn-all-articles .btn-icon {
  font-size: 1.3rem;
}

.btn-all-articles .btn-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 1.2rem;
}

.btn-all-articles:hover .btn-arrow {
  transform: translateX(5px);
}

[data-theme="dark"] .btn-all-articles {
  background: linear-gradient(135deg, #3ad691 0%, #c9a84c 100%);
  color: #1a1a2e;
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.2);
}

[data-theme="dark"] .btn-all-articles:hover {
  background: linear-gradient(135deg, #e8c86a 0%, #dbb85e 100%);
  box-shadow: 0 8px 35px rgba(201, 168, 76, 0.3);
}

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border-radius: 20px;
  max-width: 700px;
  width: 92%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 40px 35px 30px 35px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
}

[data-theme="dark"] .modal-content {
  background: #1a1a2e;
  color: #f0f0f0;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 22px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .modal-close {
  color: #f0f0f0;
  background: rgba(255, 255, 255, 0.1);
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.2);
  transform: rotate(90deg);
}

[data-theme="dark"] .modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

#modalBody h2 {
  font-size: 1.8rem;
  color: #1a1a2e;
  margin-bottom: 5px;
  border-bottom: 3px solid #c9a84c;
  padding-bottom: 10px;
}

[data-theme="dark"] #modalBody h2 {
  color: #f0f0f0;
}

#modalBody .modal-author {
  display: block;
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 5px;
}

[data-theme="dark"] #modalBody .modal-author {
  color: #aaa;
}

#modalBody .modal-date {
  display: block;
  color: #999;
  font-size: 0.8rem;
  margin-bottom: 20px;
  font-style: italic;
}

#modalBody .modal-text {
  font-size: 1rem;
  line-height: 1.8;
  color: #2c2c2c;
  white-space: pre-wrap;
  word-break: break-word;
}

[data-theme="dark"] #modalBody .modal-text {
  color: #d0d0d0;
}

.modal-footer-btn {
  text-align: center;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 2px solid rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .modal-footer-btn {
  border-top: 2px solid rgba(255, 255, 255, 0.08);
}

.btn-okudum {
  background: #c9a84c;
  color: #fff;
  border: none;
  padding: 12px 40px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(201, 168, 76, 0.3);
  letter-spacing: 1px;
}

.btn-okudum:hover {
  background: #b8963a;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(201, 168, 76, 0.4);
}

[data-theme="dark"] .btn-okudum {
  background: #c9a84c;
  color: #1a1a2e;
}

[data-theme="dark"] .btn-okudum:hover {
  background: #dbb85e;
}

/* MODAL ANİMASYONLARI */
@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===== anasayfa IMAGE POZİSYON ===== */
.anasayfa-image {
  position: relative;
  text-align: center;
  top: -100px;
}

@media (max-width: 1200px) {
  .anasayfa-image { top: -80px; }
}
@media (max-width: 992px) {
  .anasayfa-image { top: -50px; }
}
@media (max-width: 768px) {
  .anasayfa-image { top: -20px; }
}
@media (max-width: 480px) {
  .anasayfa-image { top: -10px; }
}

/* ===== LIGHTBOX NAV ===== */
.lightbox-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  pointer-events: none;
  padding: 0 20px;
  width: 100%;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  pointer-events: auto;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(184, 134, 11, 0.7);
  border-color: #b8860b;
  transform: scale(1.1);
}

.lightbox-prev { left: -50px; }
.lightbox-next { right: -50px; }

@media (max-width: 992px) {
  .lightbox-prev { left: -20px; }
  .lightbox-next { right: -20px; }
  .lightbox-prev, .lightbox-next {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .lightbox-prev { left: -10px; }
  .lightbox-next { right: -10px; }
  .lightbox-prev, .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .lightbox-prev, .lightbox-next {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
  .lightbox-prev { left: -5px; }
  .lightbox-next { right: -5px; }
}

/* ===== MOBİL KATEGORİ KİTAPLARI ===== */
@media (max-width: 992px) {
  .book {
    aspect-ratio: 280 / 370;
  }
}

@media (max-width: 768px) {
  .book {
    aspect-ratio: 270 / 360;
  }
  .btn-all-articles {
    padding: 14px 30px;
    font-size: 1rem;
    gap: 10px;
  }
}

@media (max-width: 576px) {
  .book {
    aspect-ratio: 280 / 360;
  }
  .read-btn {
    bottom: 20px;
    padding: 8px 18px;
    font-size: 0.65rem;
  }
  .book-info .book-title {
    font-size: 13px;
  }
  .book-info .book-author {
    font-size: 10px;
  }
  .modal-content {
    padding: 25px 20px 20px 20px;
    max-height: 90vh;
    width: 96%;
  }
  #modalBody h2 {
    font-size: 1.3rem;
  }
  #modalBody .modal-text {
    font-size: 0.9rem;
    line-height: 1.6;
  }
  .modal-close {
    width: 32px;
    height: 32px;
    font-size: 18px;
    top: 10px;
    right: 12px;
  }
  .btn-okudum {
    padding: 10px 30px;
    font-size: 0.9rem;
  }
  .btn-all-articles {
    padding: 12px 24px;
    font-size: 0.9rem;
    gap: 8px;
  }
  .btn-all-articles .btn-icon {
    font-size: 1.1rem;
  }
  .btn-all-articles .btn-arrow {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .book {
    aspect-ratio: 260 / 340;
  }
  .cover p {
    font-size: 0.75rem;
    padding: 5px 10px;
    bottom: 15px;
    width: 92%;
  }
  .read-btn {
    bottom: 15px;
    padding: 6px 14px;
    font-size: 0.55rem;
  }
  .btn-all-articles {
    padding: 10px 20px;
    font-size: 0.8rem;
    gap: 6px;
    border-radius: 40px;
  }
  .btn-all-articles .btn-icon {
    font-size: 0.9rem;
  }
}

/* ===== GALERİ (CONTAINER-3D) ===== */
.container-3d {
  position: relative;
  display: flex;
  align-items: center;
  transform-style: preserve-3d;
  gap: 8px;
  max-width: 1000px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: space-between;
  flex-direction: row;
}

.container-3d .box {
  position: relative;
  width: 280px;
  height: 280px;
  transition: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  -webkit-box-reflect: below 1px linear-gradient(transparent, rgba(0, 0, 0, 0.15));
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  flex-shrink: 0;
}

.container-3d .box img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  border-radius: 14px;
}

.container-3d .box:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.box-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  border-radius: 0 0 14px 14px;
  color: white;
  text-align: center;
}

.box-overlay span {
  font-size: 16px;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* ===== GALERİ (LIGHTBOX) ===== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

#lightbox-caption {
  color: white;
  text-align: center;
  margin-top: 20px;
  padding: 0 20px;
}

#lightbox-caption h4 {
  font-size: 24px;
  margin-bottom: 8px;
  color: #f0c27f;
}

#lightbox-caption p {
  font-size: 16px;
  opacity: 0.8;
  margin-bottom: 6px;
}

.lightbox-counter {
  font-size: 14px;
  opacity: 0.6;
}

.close-lightbox {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: 300;
  cursor: pointer;
  transition: 0.3s;
  z-index: 10;
}

.close-lightbox:hover {
  transform: rotate(90deg);
  color: #f0c27f;
}

/* ===== GALERİ RESPONSIVE ===== */
@media (max-width: 1200px) {
  .container-3d .box {
    flex: 0 0 calc(33.333% - 10px);
    max-width: calc(33.333% - 10px);
    height: 250px;
    min-width: 180px;
  }
}

@media (max-width: 992px) {
  .container-3d .box {
    flex: 0 0 calc(50% - 10px);
    max-width: calc(50% - 10px);
    height: 220px;
    min-width: 150px;
  }
}

@media (max-width: 768px) {
  .container-3d {
    gap: 12px;
    padding: 10px;
  }
  .container-3d .box {
    flex: 0 0 calc(50% - 8px);
    max-width: calc(50% - 8px);
    height: 180px;
    min-width: 120px;
  }
  .box-overlay span {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .container-3d .box {
    flex: 0 0 calc(50% - 6px);
    max-width: calc(50% - 6px);
    height: 140px;
    min-width: 100px;
  }
  .container-3d {
    gap: 8px;
    padding: 5px;
  }
  .box-overlay span {
    font-size: 11px;
  }
  .box-overlay {
    padding: 8px 6px;
  }
}

/* ===== GENEL GEÇİŞLER ===== */
.book,
.cover,
.cover p,
.read-btn,
.book-info .book-author,
.book-info .book-title {
  transition: all 0.3s ease;
}

/* ===== ANA SAYFA RESİM POZİSYON DÜZELTMESİ ===== */
.anasayfa-image {
  position: relative;
  text-align: center;
  top: -100px;
}

@media (max-width: 1200px) {
  .anasayfa-image { top: -80px; }
}
@media (max-width: 992px) {
  .anasayfa-image { top: -50px; }
}
@media (max-width: 768px) {
  .anasayfa-image { top: -20px; }
}
@media (max-width: 480px) {
  .anasayfa-image { top: -10px; }
}