/* =============================
   GENEL SECTION BAŞLIĞI
============================= */
.section-title {
  text-align: center;
  color: #ff2a2a;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  margin-top: 80px;
  margin-bottom: 40px;
  font-weight: bold;
  font-family: 'Orbitron', sans-serif;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  box-sizing: border-box;
}
.section-title.scroll-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================
   GÖRSEL SIRALAMA
============================= */
.image-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-bottom: 50px;
  padding: 0 5vw;
  box-sizing: border-box;
}

.image-card {
  flex: 1 1 calc(33.333% - 30px);
  max-width: calc(33.333% - 30px);
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease, opacity 0.8s ease;
  cursor: pointer;
  transform-origin: center center;
  will-change: transform;
  backface-visibility: hidden;

  opacity: 0;
  transform: translateY(40px);
}

.image-card.scroll-visible {
  opacity: 1;
  transform: translateY(0);
}

.image-card:hover,
.image-card:focus-within {
  transform: scale(1.05);
  z-index: 5;
}

/* =============================
   GÖRSEL İÇERİĞİ
============================= */
.media-container {
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: none;
  box-sizing: border-box;
}

.media-container img,
.media-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s ease;
  user-select: none;
  backface-visibility: hidden;
  will-change: opacity;
  border-radius: 16px;
  display: block;
}

.media-container img { z-index: 1; opacity: 1; }
.media-container video { z-index: 2; opacity: 0; pointer-events: none; }

.image-card:hover .media-container video,
.image-card:focus-within .media-container video { opacity: 1; }

.image-card:hover .media-container img,
.image-card:focus-within .media-container img { opacity: 0; }

/* =============================
   METİN KATMANI
============================= */
.text-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 20px 40px;
  background: linear-gradient(180deg, transparent 0%, rgba(110, 13, 13, 0.85) 80%);
  color: white;
  font-family: 'Chakra Petch', sans-serif;
  box-sizing: border-box;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  pointer-events: none;
  border-radius: 0 0 16px 16px;
}

.text-overlay h3 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  font-size: clamp(1.4rem, 4vw, 2rem);
  margin: 0;
  flex: 1;
  text-align: left;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
}

.text-overlay p {
  font-style: italic;
  font-size: clamp(1rem, 3vw, 1.2rem);
  margin: 0;
  flex: 1;
  text-align: right;
  padding-left: 20px;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
}

/* =============================
   RESPONSIVE KURALLAR
============================= */

/* ===== Desktop ===== */
@media (min-width: 1025px) {
  .image-row { gap: 30px; }
  .image-card { flex: 1 1 calc(33.333% - 30px); }
}

/* ===== Tablet (769px – 1024px) ===== */
@media (min-width: 769px) and (max-width: 1024px) {
  .image-row { gap: 25px; }
  .image-card { flex: 1 1 calc(50% - 20px); }
  .text-overlay { padding: 16px 24px; }
  .fullscreen-image-section .media-container {
    min-height: 70vh;
  }
}

/* ===== Mobil ve Küçük Tablet (0 – 768px) ===== */
@media (max-width: 768px) {
  .image-row {
    flex-direction: column;
    gap: 20px;
  }

  .image-card {
    flex: 1 1 auto;
    max-width: 95%;
    margin: 0 auto;
    min-height: 220px;     /* sabit yükseklik */
    opacity: 1 !important;
    transform: none !important;
    position: relative;
  }

  .media-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit;
  }

  .media-container img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1 !important;
    position: relative;
  }

  .media-container video {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .text-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(180deg, transparent 0%, rgba(110, 13, 13, 0.85) 80%);
    color: white;
    text-align: left;
    border-radius: 0 0 16px 16px;
  }

  .text-overlay h3,
  .text-overlay p {
    text-align: left;
    padding: 0;
    text-shadow: 0 0 5px rgba(201, 1, 1, 0.7);
  }

  .fullscreen-image-section .media-container {
    min-height: 75vh;
  }
}

/* ===== Küçük Telefon (max 480px) ===== */
@media (max-width: 480px) {
  .text-overlay h3 { font-size: 1.3rem; }
  .text-overlay p { font-size: 0.95rem; }
  .fullscreen-image-section .media-container {
    min-height: 80vh;
  }
}

/* ===== Dokunmatik cihazlar (iOS / Android) ===== */
@media (hover: none), (pointer: coarse) {
  .image-card:hover,
  .image-card:focus-within { 
    transform: none !important; 
    z-index: auto !important; 
  }

  .image-card .media-container video { 
    display: none !important;
  }

  .image-card .media-container img { 
    opacity: 1 !important; 
    display: block !important;
  }

  .section-title,
  .image-card { 
    opacity: 1 !important; 
    transform: none !important; 
    transition: none !important; 
  }

  .fullscreen-image-section video { 
    display: none !important;
  }

  .fullscreen-image-section img {
    display: block !important;
    opacity: 1 !important;
  }
}

