/**
 * Blog Listing Page Styles
 * Styles for blog cards grid
 */

/* Font Family */
.blog-card,
.blog-card *,
.blog-title,
.blog-summary,
.btn-read-more {
  font-family: 'Tajawal', Arial, Helvetica, sans-serif !important;
}

/* Blog Section */
.blog {
  padding-bottom: 3rem;
}

/* Ultra Premium 3D Blog Card Styles */
.blog-card {
  background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 
    0 15px 45px rgba(10, 15, 60, 0.1),
    0 5px 15px rgba(10, 15, 60, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.8);
  transform-style: preserve-3d;
}

/* Animated Border */
.blog-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, 
    var(--gold-start), 
    var(--gold-light), 
    var(--navy-blue), 
    var(--gold-start));
  background-size: 300% 300%;
  border-radius: 24px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
  animation: borderGlow 4s ease infinite;
}

.blog-card:hover::before {
  opacity: 1;
}

/* Shine Effect */
.blog-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
  pointer-events: none;
}

.blog-card:hover::after {
  animation: shine 1.5s ease-in-out;
}

.blog-card:hover {
  transform: translateY(-15px) scale(1.03) rotateX(3deg);
  box-shadow: 
    0 30px 70px rgba(200, 160, 65, 0.3),
    0 15px 30px rgba(10, 15, 60, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  border-color: rgba(232, 196, 106, 0.4);
}

.blog-image-wrapper {
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: linear-gradient(145deg, #f8f9fa 0%, #ffffff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
  border-bottom: 2px solid rgba(232, 196, 106, 0.1);
}

.blog-image-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    rgba(232, 196, 106, 0.05) 0%, 
    transparent 50%, 
    rgba(26, 37, 112, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.blog-card:hover .blog-image-wrapper::before {
  opacity: 1;
}

.blog-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: block;
  filter: brightness(0.95);
}

.blog-card:hover .blog-image {
  transform: scale(1.1) translateZ(10px);
  filter: brightness(1);
}

.blog-content {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  background: linear-gradient(to bottom, #ffffff 0%, #fafbfc 100%);
}

.blog-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy-blue);
  margin-bottom: 1rem;
  line-height: 1.4;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
}

.blog-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-start), var(--gold-light));
  transition: width 0.4s ease;
  border-radius: 2px;
}

.blog-card:hover .blog-title::after {
  width: 100%;
}

.blog-card:hover .blog-title {
  color: var(--gold-start);
  transform: translateX(-3px);
}

[dir="ltr"] .blog-card:hover .blog-title {
  transform: translateX(3px);
}

.blog-summary {
  color: #666;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex: 1;
  font-size: 0.98rem;
  font-weight: 500;
}

.btn-read-more {
  background: linear-gradient(135deg, var(--gold-start) 0%, var(--gold-end) 100%);
  color: #fff;
  border: none;
  padding: 0.9rem 2rem;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  align-self: flex-start;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 8px 20px rgba(200, 160, 65, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-read-more::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn-read-more:hover::before {
  left: 100%;
}

.btn-read-more:hover {
  transform: translateX(-6px) translateY(-2px);
  box-shadow: 
    0 12px 30px rgba(200, 160, 65, 0.5),
    0 6px 15px rgba(200, 160, 65, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, var(--gold-end) 0%, var(--gold-start) 100%);
}

[dir="ltr"] .btn-read-more:hover {
  transform: translateX(6px) translateY(-2px);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .blog {
    margin-top: 120px;
  }
}

@media (max-width: 576px) {
  .blog {
    margin-top: 100px;
  }
}

/* Ensure sections never animate - only content inside */
section {
  opacity: 1 !important;
  transform: none !important;
}

section.animate-on-scroll,
section.fade-in-up {
  opacity: 1 !important;
  transform: translateY(0) !important;
}
