/* Magazine Carousel Styles */
.magazine-carousel-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    padding: 40px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.magazine-swiper {
    width: 100%;
    padding: 20px 0 60px;
}

/* CRITICAL: Force 5 slides always - override everything */
.magazine-swiper .swiper-slide {
    width: 20% !important;
    flex-shrink: 0 !important;
    max-width: none !important;
    min-width: 20% !important;
}

/* Prevent any responsive changes */
@media (min-width: 1px) {
    .magazine-swiper .swiper-slide {
        width: 20% !important;
        flex-shrink: 0 !important;
    }
}

.magazine-slide {
    transition: all 0.3s ease;
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 20% !important;
}

.magazine-slide:hover {
    transform: translateY(-10px);
}

.magazine-cover {
    position: relative;
    width: 100%;
    max-width: 240px; /* Constrain the magazine size within each slide */
    height: 360px;
    margin: 0 auto; /* Center within the slide */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.magazine-cover:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.magazine-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.magazine-cover:hover .magazine-image {
    transform: scale(1.05);
}

.magazine-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #999;
    font-weight: 500;
}

.magazine-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding: 60px 20px 20px;
    color: white;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.magazine-cover:hover .magazine-overlay {
    transform: translateY(0);
    opacity: 1;
}

.magazine-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.magazine-subtitle {
    font-size: 14px;
    margin: 0 0 12px;
    opacity: 0.9;
    font-style: italic;
}

.magazine-featured {
    font-size: 13px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 6px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Swiper Navigation */
.magazine-swiper .swiper-button-next,
.magazine-swiper .swiper-button-prev {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-top: -25px;
    transition: all 0.3s ease;
}

.magazine-swiper .swiper-button-next:hover,
.magazine-swiper .swiper-button-prev:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.magazine-swiper .swiper-button-next::after,
.magazine-swiper .swiper-button-prev::after {
    font-size: 18px;
    font-weight: 700;
}

/* Swiper Pagination */
.magazine-swiper .swiper-pagination {
    bottom: 10px;
}

.magazine-swiper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    transition: all 0.3s ease;
}

.magazine-swiper .swiper-pagination-bullet-active {
    background: white;
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .magazine-carousel-container {
        padding: 20px 0;
    }
    
    .magazine-slide {
        max-width: 220px;
    }
    
    .magazine-cover {
        height: 320px;
    }
    
    .magazine-title {
        font-size: 16px;
    }
    
    .magazine-featured {
        font-size: 12px;
    }
    
    .magazine-swiper .swiper-button-next,
    .magazine-swiper .swiper-button-prev {
        display: none;
    }
}

@media (max-width: 480px) {
    .magazine-slide {
        max-width: 180px;
    }
    
    .magazine-cover {
        height: 260px;
    }
    
    .magazine-overlay {
        padding: 40px 15px 15px;
    }
    
    .magazine-title {
        font-size: 14px;
    }
    
    .magazine-subtitle {
        font-size: 12px;
    }
}

/* Enterprise Theme Variations */
.magazine-carousel-container.enterprise-dark {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d3748 100%);
}

.magazine-carousel-container.enterprise-blue {
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
}

.magazine-carousel-container.enterprise-green {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
}

/* Loading Animation */
.magazine-carousel-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    color: white;
}

.magazine-carousel-loading::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Center slide styling for better focus */
.magazine-swiper .swiper-slide-active {
    transform: scale(1.05);
    z-index: 2;
}

.magazine-swiper .swiper-slide-active .magazine-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth transitions */
.magazine-swiper .swiper-slide {
    transition: transform 0.3s ease;
}

/* Additional hover effects */
.magazine-cover::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: 1;
}

.magazine-cover:hover::before {
    transform: translateX(100%);
}

/* Text animations */
.magazine-title,
.magazine-subtitle,
.magazine-featured {
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.magazine-cover:hover .magazine-title,
.magazine-cover:hover .magazine-subtitle,
.magazine-cover:hover .magazine-featured {
    transform: translateY(0);
}

.magazine-cover:hover .magazine-subtitle {
    transition-delay: 0.1s;
}

.magazine-cover:hover .magazine-featured {
    transition-delay: 0.2s;
}