/* ==========================================================
   BLOG SECTION BASE STYLES (Provided in context)
   ========================================================== */
.blog-grid-section {
    padding: 80px 15px;
    background-color: var(--light-gray); /* Light blue-gray background */
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    /* Essential for the 3D 'slide-fwd-center' animation */
    perspective: 1000px; 
}

/* Base Blog Post Styles */
.blog-post {
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background-color: var(--white);
    overflow: hidden;
    transition: all 0.5s ease; /* Transition for box-shadow and transform (tilt/lift) */
    position: relative;
    cursor: pointer;
    
    /* Initially hide the card for the JavaScript staggered animation */
    opacity: 0;
    
    /* Set up for 3D tilt effect */
    transform-style: preserve-3d;
}

/* ==========================================================
   1. KEYFRAMES: Staggered Slide-In (slide-fwd-center)
   ========================================================== */
@-webkit-keyframes slide-fwd-center {
  0% {
    -webkit-transform: translateZ(-1400px);
            transform: translateZ(-1400px);
    opacity: 0;
  }
  100% {
    -webkit-transform: translateZ(0);
            transform: translateZ(0);
    opacity: 1;
  }
}
@keyframes slide-fwd-center {
  0% {
    -webkit-transform: translateZ(-1400px);
            transform: translateZ(-1400px);
    opacity: 0;
  }
  100% {
    -webkit-transform: translateZ(0);
            transform: translateZ(0);
    opacity: 1;
  }
}

/* Animation class applied by JavaScript */
.anim-slide-fwd-center {
	-webkit-animation: slide-fwd-center 0.6s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
	        animation: slide-fwd-center 0.6s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
    animation-fill-mode: both; /* Keeps the final state */
}

/* ==========================================================
   2. IMAGE HOVER EFFECT (Ken Burns/Parallax)
   ========================================================== */
.post-image-wrapper {
    overflow: hidden; /* **ESSENTIAL** to contain the scaled image */
    border-radius: 8px 8px 0 0;
    height: 220px; /* Example height, adjust as needed */
    position: relative;
}

.post-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Smooth transition for the scale effect */
    transform: scale(1);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
}

/* Hover: Scale up the image inside the wrapper */
.blog-post:hover .post-image-wrapper img {
    transform: scale(1.08); 
}

/* ==========================================================
   3. 3D CARD TILT ON HOVER
   ========================================================== */
.blog-post:hover {
    /* Lift the card and add a subtle 3D rotation */
    transform: translateY(-5px) rotateX(1deg) rotateY(1deg); 
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2); /* Stronger shadow on lift */
}

/* ==========================================================
   BLOG POST CONTENT STYLES (Keep for context/completeness)
   ========================================================== */
.post-category {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 10px;
    border-radius: 4px;
    color: var(--charcoal-black);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    background-color: var(--metallic-gold);
    z-index: 2;
}

.post-content {
    padding: 20px;
    flex-grow: 1;
}

.post-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--charcoal-black);
    margin-bottom: 10px;
}

.post-content p {
    font-size: 0.95rem;
    color: var(--dark-gray);
    line-height: 1.6;
    margin-bottom: 15px;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--medium-gray);
    border-top: 1px solid var(--light-gray);
    padding-top: 15px;
}

.post-meta i {
    color: var(--metallic-gold);
    margin-right: 5px;
}

/* Responsive adjustments (You may have these elsewhere, included for completeness) */
@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}