/* ===== BLOG CAROUSEL STYLES ===== */

/* Blog Carousel Section */
.blog-carousel-section {
    background: #000;
    padding: 60px 0;
    overflow: hidden;
}

/* Keep section header visible */

/* Carousel Wrapper */
.blog-carousel-wrapper {
    position: relative;
    margin-top: 50px;
    padding: 0;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* Pause animation on hover */
.blog-carousel-track:hover {
    animation-play-state: paused;
}

/* Carousel Track */
.blog-carousel-track {
    display: flex;
    gap: 30px;
    overflow: hidden;
    padding: 20px 0;
    animation: scroll-horizontal 40s linear infinite;
    width: max-content;
}

/* Infinite scroll animation */
@keyframes scroll-horizontal {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Individual Slide */
.blog-carousel-slide {
    flex: 0 0 400px;
    min-width: 400px;
    transition: transform 0.3s ease;
}

/* Blog Card - Hover effects */
.blog-card {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.4s ease;
}

.blog-card:hover {
    transform: rotate(-2deg) scale(1.05);
}

.blog-card-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 20px;
    border: 3px solid transparent;
    transition: all 0.4s ease;
}

.blog-card:hover .blog-card-image {
    border-color: #c0c0c0;
    box-shadow: 0 10px 40px rgba(192, 192, 192, 0.3);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 17px;
}

/* Gradient overlay at bottom */
.blog-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.7) 40%,
        rgba(0, 0, 0, 0.3) 70%,
        transparent 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 0 0 17px 17px;
}

.blog-card:hover .blog-card-overlay {
    opacity: 1;
}

/* Title on image */
.blog-card-title {
    color: white;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    line-height: 1.3;
}

/* Description on image (shown on hover) */
.blog-card-overlay .blog-card-excerpt {
    display: block !important;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* Hide other elements */
.blog-card-category,
.blog-card-content,
.blog-card-link {
    display: none !important;
}

/* Hide excerpt that's not inside overlay */
.blog-card-content .blog-card-excerpt {
    display: none !important;
}

/* Navigation Buttons - HIDDEN for auto-scroll */
.blog-carousel-btn {
    display: none;
}

.blog-carousel-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.3);
}

.blog-carousel-btn.prev {
    left: 0;
}

.blog-carousel-btn.next {
    right: 0;
}

.blog-carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.blog-carousel-btn:disabled:hover {
    background: white;
    color: #333;
    border-color: #e0e0e0;
    transform: translateY(-50%);
}

/* Responsive Design */

/* Mobile */
@media (max-width: 768px) {
    .blog-carousel-section {
        padding: 60px 0;
    }
    
    .blog-carousel-slide {
        flex: 0 0 320px;
        min-width: 320px;
    }
    
    .blog-carousel-track {
        gap: 20px;
    }
    
    .blog-card-image {
        height: 240px;
    }
    
    .blog-card-overlay {
        padding: 20px;
    }
    
    .blog-card-title {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .blog-card-overlay .blog-card-excerpt {
        font-size: 13px;
        line-height: 1.5;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .blog-carousel-section {
        padding: 40px 0;
    }
    
    .blog-carousel-slide {
        flex: 0 0 280px;
        min-width: 280px;
    }
    
    .blog-card-image {
        height: 200px;
    }
    
    .blog-card-overlay {
        padding: 15px;
        height: 65%;
    }
    
    .blog-card-title {
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    .blog-card-overlay .blog-card-excerpt {
        font-size: 12px;
        line-height: 1.4;
    }
}

/* Animation for smooth appearance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-carousel-slide {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth scrolling */
.blog-carousel-track {
    scroll-snap-type: x mandatory;
}

.blog-carousel-slide {
    scroll-snap-align: start;
}

/* Performance optimization */
.blog-card-image {
    will-change: transform;
    backface-visibility: hidden;
}

.blog-card-image img {
    will-change: transform;
    backface-visibility: hidden;
}

/* ===== HERO CAROUSEL STYLES (OLD - KEEP FOR REFERENCE) ===== */

.hero {
    position: relative;
    overflow: hidden;
}

/* Carousel Container */
.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Carousel Track */
.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Individual Slides */
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 1.5s ease-in-out;
    transform: scale(1.1);
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.carousel-slide.prev {
    opacity: 0;
    transform: scale(1);
}

/* Slide Images */
.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Dark Overlay */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.7) 0%,
        rgba(118, 75, 162, 0.7) 100%
    );
    z-index: 2;
}

/* Hero Content - Above Carousel */
.hero-content {
    position: relative;
    z-index: 3;
}

/* Navigation Buttons */
.carousel-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 4;
    pointer-events: none;
}

.carousel-btn {
    pointer-events: all;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    color: white;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.carousel-btn:active {
    transform: scale(0.95);
}

.carousel-btn svg {
    width: 24px;
    height: 24px;
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 4;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.indicator.active {
    background: white;
    border-color: white;
    width: 32px;
    border-radius: 6px;
}

/* Animation for Ken Burns Effect */
@keyframes kenBurns {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

.carousel-slide.active img {
    animation: kenBurns 15s ease-out infinite alternate;
}

/* Responsive Design */
@media (max-width: 768px) {
    .carousel-nav {
        padding: 0 15px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .carousel-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .carousel-indicators {
        bottom: 20px;
        gap: 8px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
    
    .indicator.active {
        width: 24px;
    }
}

@media (max-width: 480px) {
    .carousel-nav {
        display: none; /* Hide nav buttons on very small screens */
    }
    
    .carousel-indicators {
        bottom: 15px;
        gap: 6px;
    }
    
    .indicator {
        width: 8px;
        height: 8px;
    }
    
    .indicator.active {
        width: 20px;
    }
}

/* Smooth transitions */
.carousel-slide {
    will-change: opacity, transform;
}

/* Performance optimization */
.hero-carousel {
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

.carousel-slide img {
    will-change: transform;
    backface-visibility: hidden;
}
