/* Blog Section */
.blog {
    padding: 100px 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(229, 45, 39, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(37, 117, 252, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f0f4ff 100%);
    position: relative;
    overflow: hidden;
}

.blog::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #e52d27 30%, #2575fc 70%, transparent);
    animation: shimmer 3s ease-in-out infinite;
}

.blog::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: 5%;
    width: 120px;
    height: 120px;
    background: 
        radial-gradient(circle, rgba(229, 45, 39, 0.15) 0%, rgba(229, 45, 39, 0.05) 40%, transparent 70%),
        radial-gradient(circle at 30% 30%, rgba(37, 117, 252, 0.1) 0%, transparent 50%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite, pulse 4s ease-in-out infinite;
    filter: blur(1px);
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); opacity: 0; }
    50% { transform: translateX(100%); opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 0.3; }
}

.blog-slider {
    position: relative;
    overflow: hidden;
    margin-top: 60px;
    padding: 0 20px;
}

.blog-container {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    gap: 30px;
}

.blog-post {
    flex: 0 0 calc(33.333% - 20px);
    background: 
        linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.1),
        0 1px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    transform-style: preserve-3d;
}

.blog-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(229, 45, 39, 0.05), rgba(37, 117, 252, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 24px;
    z-index: 1;
}

.blog-post:hover {
    transform: translateY(-15px) rotateX(5deg);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 10px 20px rgba(229, 45, 39, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: rgba(229, 45, 39, 0.2);
}

.blog-post:hover::before {
    opacity: 1;
}

.blog-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.blog-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(229, 45, 39, 0.1), rgba(37, 117, 252, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.blog-post:hover .blog-image::after {
    opacity: 1;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: brightness(1) contrast(1.05);
}

.blog-post:hover .blog-image img {
    transform: scale(1.08);
    filter: brightness(1.1) contrast(1.1);
}

.blog-content {
    padding: 30px;
    position: relative;
    z-index: 2;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.9));
}

.blog-date {
    color: #e52d27;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    position: relative;
}

.blog-date::before {
    content: '';
    width: 8px;
    height: 8px;
    background: linear-gradient(45deg, #e52d27, #ff6b6b);
    border-radius: 50%;
    margin-right: 10px;
    animation: datePulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(229, 45, 39, 0.3);
}

@keyframes datePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 10px rgba(229, 45, 39, 0.3); }
    50% { transform: scale(1.2); box-shadow: 0 0 15px rgba(229, 45, 39, 0.5); }
}

.blog-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #333, #555);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.blog-post:hover .blog-content h3 {
    background: linear-gradient(135deg, #e52d27, #2575fc);
    background-clip: text;
    -webkit-background-clip: text;
    transform: translateY(-2px);
}

.blog-content p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 25px;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.blog-post:hover .blog-content p {
    color: #555;
}

.read-more {
    color: #e52d27;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(229, 45, 39, 0.1), rgba(229, 45, 39, 0.05));
    border: 1px solid rgba(229, 45, 39, 0.2);
}

.read-more::after {
    content: '→';
    margin-left: 8px;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-size: 1.1em;
}

.read-more:hover {
    background: linear-gradient(135deg, #e52d27, #2575fc);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 45, 39, 0.3);
}

.read-more:hover::after {
    transform: translateX(5px) scale(1.2);
}

/* Navigation Buttons */
.blog-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: 
        linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.12),
        0 5px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    color: #e52d27;
}

.blog-nav:hover {
    background: linear-gradient(145deg, #e52d27, #ff6b6b);
    color: white;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 
        0 15px 35px rgba(229, 45, 39, 0.3),
        0 5px 15px rgba(229, 45, 39, 0.2),
        0 0 0 5px rgba(229, 45, 39, 0.1);
    border-color: rgba(255, 255, 255, 0.7);
}

.blog-nav:active {
    transform: translateY(-50%) scale(0.95);
    box-shadow: 
        0 8px 20px rgba(229, 45, 39, 0.2),
        0 3px 10px rgba(229, 45, 39, 0.1);
}

.blog-nav.prev {
    left: 10px;
}

.blog-nav.next {
    right: 10px;
}

.blog-nav i {
    font-size: 1.4rem;
    transition: transform 0.3s ease;
    position: relative;
    top: 1px;
}

.blog-nav:hover i {
    transform: scale(1.2);
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from { opacity: 0.8; }
    to { opacity: 1; }
}

/* Enhanced Animation Keyframes */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px) rotateY(-15deg);
    }
    100% {
        opacity: 1;
        transform: translateX(0) rotateY(0);
    }
}

/* Blog Animation */
.blog-post {
    animation: slideInFromLeft 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
}

.blog-post:nth-child(1) { animation-delay: 0.1s; }
.blog-post:nth-child(2) { animation-delay: 0.2s; }
.blog-post:nth-child(3) { animation-delay: 0.3s; }
.blog-post:nth-child(4) { animation-delay: 0.4s; }

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-post {
        flex: 0 0 calc(50% - 15px);
    }
    
    .blog-nav {
        width: 45px;
        height: 45px;
    }
    
    .blog-nav i {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .blog {
        padding: 60px 0;
    }
    
    .blog-post {
        flex: 0 0 calc(100% - 0px);
    }
    
    .blog-container {
        gap: 20px;
    }
    
    .blog-image {
        height: 200px;
    }
    
    .blog-content {
        padding: 25px;
    }
    
    .blog-content h3 {
        font-size: 1.2rem;
    }
    
    .blog-nav {
        width: 40px;
        height: 40px;
    }
    
    .blog-nav.prev {
        left: -20px;
    }
    
    .blog-nav.next {
        right: -20px;
    }
    
    .blog-nav i {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .blog-content {
        padding: 20px;
    }
    
    .blog-content h3 {
        font-size: 1.1rem;
    }
    
    .blog-content p {
        font-size: 0.9rem;
    }
    
    .blog-nav {
        display: none;
    }
    
    .blog-slider {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .blog-slider::-webkit-scrollbar {
        display: none;
    }
    
    .blog-container {
        width: max-content;
    }
    
    .blog-post {
        flex: 0 0 280px;
    }
}
