/* Image Results - Matching results.css style */

/* Images Container - Two column layout */
.images-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 30px;
  animation: fadeIn 0.5s ease-out;
}

/* Image Card - matching result style */
.image-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  position: relative;
}

/* Staggered animation delays */
.image-card:nth-child(1) { animation-delay: 0.05s; }
.image-card:nth-child(2) { animation-delay: 0.1s; }
.image-card:nth-child(3) { animation-delay: 0.15s; }
.image-card:nth-child(4) { animation-delay: 0.2s; }
.image-card:nth-child(5) { animation-delay: 0.25s; }
.image-card:nth-child(6) { animation-delay: 0.3s; }

/* Palestinian flag accent stripe on the left/right */
.image-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(
    180deg,
    var(--gray-900) 0%,
    var(--gray-900) 25%,
    var(--white) 25%,
    var(--white) 50%,
    var(--green-primary) 50%,
    var(--green-primary) 75%,
    var(--red-primary) 75%,
    var(--red-primary) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.rtl .image-card::before {
  left: auto;
  right: 0;
}

.image-link:hover .image-card::before {
  opacity: 1;
}

/* Hover effect - matching result hover */
.image-link:hover .image-card {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gray-200);
}

.image-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.image-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-link:hover .image-wrapper img {
  transform: scale(1.05);
}

/* Image overlay - modern style */
.image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  padding: 20px;
  color: white;
}

.image-title {
  font-family: 'Noto Kufi Arabic', sans-serif;
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  line-height: 1.5;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Image badge - redesigned to match type badge style */
.image-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  background: var(--green-primary);
  color: var(--white);
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(27, 122, 43, 0.25);
  z-index: 2;
}

body.rtl .image-badge {
  right: auto;
  left: 12px;
}

.image-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .images-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .image-wrapper {
    height: 180px;
  }

  .image-title {
    font-size: 14px;
  }

  .image-badge {
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    font-size: 11px;
  }

  body.rtl .image-badge {
    right: auto;
    left: 10px;
  }
}

@media (max-width: 640px) {
  .images-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .image-wrapper {
    height: 160px;
  }

  .image-overlay {
    padding: 15px;
  }

  .image-title {
    font-size: 13px;
  }

  .image-badge {
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    font-size: 10px;
  }

  body.rtl .image-badge {
    right: auto;
    left: 8px;
  }
}

@media (max-width: 480px) {
  .images-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .image-wrapper {
    height: 200px;
  }
}
