/* CSS Variables for consistent theming */
:root {
    --primary-color: #3b82f6;
    --primary-color-rgb: 59, 130, 246;
    --carousel-transition: cubic-bezier(0.25, 0.8, 0.25, 1);
    --carousel-duration: 0.8s;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

/* Hero Carousel Styles - Modern & Responsive */
.hero-carousel-section {
    margin-bottom: 2rem;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

/* Prevent conflicts with Owl Carousel */
.hero-carousel-section .owl-carousel,
.hero-carousel-section .owl-stage-outer,
.hero-carousel-section .owl-stage,
.hero-carousel-section .owl-item {
    display: none !important;
}

/* Carousel container */
#heroCarousel {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

/* Ensure Bootstrap carousel behavior */
#heroCarousel.carousel {
    position: relative !important;
}

#heroCarousel .carousel-inner {
    position: relative !important;
    width: 100% !important;
    overflow: hidden !important;
    border-radius: 20px;
}

/* Modern Carousel item with smooth transitions */
.carousel-item {
    height: 70vh;
    min-height: 500px;
    max-height: 700px;
    position: relative;
    overflow: hidden !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f8f9fa !important;
    transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.carousel-item.active {
    display: flex !important;
}

/* Smooth slide transition effects */
.carousel-item.carousel-item-next,
.carousel-item.carousel-item-prev {
    display: flex !important;
}

/* Clean image display with no effects */
.carousel-item.active .hero-image {
    animation: none;
    transform: none;
    image-rendering: auto;
    filter: none;
    opacity: 1 !important;
}

/* Modern image styling with aspect ratio preservation */
.carousel-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    border: none !important;
    outline: none !important;
    border-radius: 20px 20px 0 0 !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    min-width: 100% !important;
    min-height: 100% !important;
    transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 1 !important;
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: opacity;
    z-index: 1;
    background: #f8f9fa;
}

/* Ensure no pseudo-elements create lines on images */
.carousel-item img::before,
.carousel-item img::after,
.hero-image::before,
.hero-image::after {
    display: none !important;
    content: none !important;
}

/* Remove all overlays and pseudo-elements */
.carousel-item::before,
.carousel-item::after {
    display: none !important;
    content: none !important;
    visibility: hidden !important;
}

/* Ensure carousel caption appears above image */
.carousel-caption {
    z-index: 10 !important;
    position: absolute !important;
}

/* Smooth fade transitions between slides */
.carousel-item {
    transition: opacity var(--carousel-duration) var(--carousel-transition);
}

.carousel-item:not(.active) {
    opacity: 0;
}

.carousel-item.active {
    opacity: 1;
}

/* Enhanced hover effects for better interactivity */
.hero-carousel-section:hover .carousel-control-prev,
.hero-carousel-section:hover .carousel-control-next {
    opacity: 1;
}

/* Auto-hide controls on mobile to prevent interference */
@media (max-width: 768px) {
    .carousel-control-prev,
    .carousel-control-next {
        display: none;
    }
    
    .carousel-indicators {
        position: absolute;
        bottom: 1rem;
        margin-bottom: 0;
    }
    
    /* Fix potential mobile positioning issues */
    .hero-carousel-section {
        position: relative !important;
        transform: none !important;
        will-change: auto !important;
    }
    
    #heroCarousel {
        position: relative !important;
        transform: none !important;
        will-change: auto !important;
    }
    
    .carousel-inner {
        position: relative !important;
        transform: none !important;
        will-change: auto !important;
    }
    
    /* Ensure proper image rendering on mobile */
    .carousel-item img {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: auto;
        border-radius: 0 !important; /* Force no border-radius on mobile */
        border: none !important; /* Force no border on mobile */
        outline: none !important; /* Force no outline on mobile */
        box-shadow: none !important; /* Force no shadow on mobile */
    }
    
    /* Remove any potential mobile overlays that could create lines */
    .carousel-item::before,
    .carousel-item::after {
        content: none !important;
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Force clean image background on mobile */
    .carousel-item img {
        background: none !important;
        background-image: none !important;
        background-color: transparent !important;
    }
}

/* Mobile-specific fixes for position and overlay issues */
@media screen and (max-width: 768px) {
    /* Ensure no fixed positioning issues on mobile */
    .carousel-item,
    .carousel-item img,
    .carousel-caption {
        position: relative !important;
        transform: none !important;
        will-change: auto !important;
    }
    
    .carousel-item img {
        position: absolute !important; /* Override above for proper image positioning */
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Force remove any potential mobile overlays */
    .carousel-item {
        background: transparent !important;
    }
    
    .carousel-item::before,
    .carousel-item::after {
        content: none !important;
        display: none !important;
    }
}

/* Specific fixes for iOS and mobile webkit to prevent black lines */
@media screen and (max-width: 768px) and (-webkit-min-device-pixel-ratio: 1) {
    .carousel-item img {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        border-radius: 0 !important;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
        background: none !important;
    }
    
    /* Ensure container doesn't interfere with image on mobile webkit */
    .hero-carousel-section,
    #heroCarousel,
    .carousel-inner {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* Additional mobile fixes for Android devices */
@media screen and (max-width: 768px) {
    /* Force remove any potential artifacts on mobile */
    .carousel-item img {
        image-rendering: auto !important;
        -webkit-appearance: none;
        appearance: none;
    }
    
    /* Prevent touch/scroll conflicts that might show artifacts */
    .hero-carousel-section {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        touch-action: manipulation;
    }
}

/* Focus states for accessibility */
.carousel-control-prev:focus,
.carousel-control-next:focus,
.carousel-indicators button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .hero-carousel-section {
        page-break-inside: avoid;
    }
    
    .carousel-control-prev,
    .carousel-control-next,
    .carousel-indicators {
        display: none;
    }
    
    .carousel-item:not(.active) {
        display: none;
    }
}

/* Responsive heights */
@media (max-width: 1200px) {
    .carousel-item {
        height: 60vh;
        min-height: 450px;
    }
}

/* Ultra-wide screen optimizations */
@media (min-width: 1400px) {
    .carousel-item {
        height: 65vh;
        min-height: 600px;
        max-height: 800px;
    }
    
    .carousel-item img {
        object-fit: contain !important;
        object-position: center !important;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    .hero-carousel-section {
        border-radius: 25px;
        max-width: 1600px;
        margin: 0 auto 2rem auto;
    }
}

/* Large desktop optimizations */
@media (min-width: 1200px) and (max-width: 1399px) {
    .carousel-item {
        height: 70vh;
        min-height: 550px;
        max-height: 750px;
    }
    
    .carousel-item img {
        object-fit: cover !important;
        object-position: center !important;
    }
    
    /* Smart object positioning for better framing */
    .carousel-item:nth-child(odd) img {
        object-position: center top !important;
    }
    
    .carousel-item:nth-child(even) img {
        object-position: center center !important;
    }
}

/* Wide screen aspect ratio optimization */
@media (min-width: 1600px) {
    .carousel-item {
        height: 60vh;
        min-height: 650px;
        max-height: 900px;
    }
    
    .carousel-item img {
        object-fit: contain !important;
        background: #f8f9fa !important;
        border-radius: 20px !important;
    }
    
    .hero-carousel-section {
        max-width: 1800px;
        border-radius: 30px;
    }
    
    #heroCarousel,
    #heroCarousel .carousel-inner {
        border-radius: 30px;
    }
}

@media (max-width: 768px) {
    .carousel-item {
        height: 50vh;
        min-height: 400px;
    }
    
    .hero-carousel-section {
        border-radius: 15px;
    }
    
    #heroCarousel,
    #heroCarousel .carousel-inner {
        border-radius: 15px;
    }
    
    .carousel-item img {
        border-radius: 0 !important; /* Remove border-radius on mobile */
    }
}

@media (max-width: 576px) {
    .carousel-item {
        height: 45vh;
        min-height: 350px;
    }
    
    .hero-carousel-section {
        border-radius: 10px;
    }
    
    #heroCarousel,
    #heroCarousel .carousel-inner {
        border-radius: 10px;
    }
    
    .carousel-item img {
        border-radius: 0 !important; /* Remove border-radius on small mobile */
    }
}

/* Enhanced caption overlay with minimal interference */
.carousel-caption {
    background: rgba(255, 255, 255, 0.15);
    left: 2rem;
    right: 2rem;
    bottom: 2rem;
    padding: 2rem;
    text-align: center;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(30px);
    opacity: 0;
    animation: slideUpFadeIn 1s ease-out 0.5s forwards;
    position: absolute;
    z-index: 10;
}

@keyframes slideUpFadeIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Enhanced responsive design for caption */
@media (min-width: 768px) {
    .carousel-caption {
        left: 3rem;
        right: 3rem;
        bottom: 3rem;
        padding: 3rem;
        border-radius: 25px;
        text-align: center;
        /* No backdrop-filter or border on desktop */
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
    }
}

@media (max-width: 767px) {
    .carousel-caption {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        padding: 1.5rem;
        border-radius: 15px;
        text-align: center;
        /* Only apply backdrop-filter and border on mobile/tablet */
        backdrop-filter: blur(1px) saturate(1.1);
        -webkit-backdrop-filter: blur(1px) saturate(1.1);
        border: 1px solid rgba(255, 255, 255, 0.15);
    }
}

/* Modern category badge with glow effect */
.category-badge {
    background: linear-gradient(135deg, var(--primary-color), #667eea);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: inline-block;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
    text-align: center;
}

.category-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Enhanced slide title styling */
.slide-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
}

.slide-title a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.slide-title a:hover {
    color: #f8f9fa;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
}

@media (max-width: 768px) {
    .slide-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .slide-title {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }
}

/* Modern slide meta with better spacing */
.slide-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 500;
}

@media (max-width: 576px) {
    .slide-meta {
        gap: 1rem;
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }
}

.meta-item {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modern slide actions with enhanced buttons */
.slide-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

@media (max-width: 576px) {
    .slide-actions {
        gap: 0.8rem;
        flex-direction: column;
        align-items: center;
    }
    
    .slide-actions .btn {
        min-width: 200px;
    }
}

.btn-read, .btn-share {
    border-radius: 25px;
    padding: 0.7rem 2rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.btn-read {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
    backdrop-filter: blur(2px);
}

.btn-read::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.6s;
}

.btn-read:hover::before {
    left: 100%;
}

.btn-read:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(37, 99, 235, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-share {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-share::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-share:hover::before {
    opacity: 1;
}

.btn-share:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 255, 255, 0.2);
    color: white;
}

/* Modern carousel indicators */
.modern-indicators {
    margin-bottom: 2rem;
    gap: 1rem;
    display: flex !important;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

.modern-indicators .indicator-btn {
    width: 60px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0;
    border: none;
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.modern-indicators .indicator-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.modern-indicators .indicator-btn:hover::before {
    transform: translateX(100%);
}

.modern-indicators .indicator-btn .indicator-dot {
    position: absolute;
    top: 50%;
    left: 8px;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

.modern-indicators .indicator-btn .indicator-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.8) 0%, 
        rgba(255, 255, 255, 1) 50%, 
        rgba(255, 255, 255, 0.8) 100%);
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.modern-indicators .indicator-btn .indicator-tooltip {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modern-indicators .indicator-btn .indicator-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
}

.modern-indicators .indicator-btn:hover .indicator-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: 25px;
}

.modern-indicators .indicator-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.modern-indicators .indicator-btn:hover .indicator-dot {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-50%) scale(1.2);
}

.modern-indicators .indicator-btn.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.modern-indicators .indicator-btn.active .indicator-progress {
    width: 100%;
    animation: progressPulse 6s ease-in-out infinite;
}

.modern-indicators .indicator-btn.active .indicator-dot {
    background: white;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    transform: translateY(-50%) scale(1.3);
}

@keyframes progressPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
    }
}

/* Progress animation for auto-advance */
.modern-indicators .indicator-btn.active .indicator-progress.auto-advance {
    animation: autoAdvanceProgress 6s linear;
}

@keyframes autoAdvanceProgress {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* Mobile responsive indicators */
@media (max-width: 768px) {
    .modern-indicators {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .modern-indicators .indicator-btn {
        width: 40px;
        height: 4px;
    }
    
    .modern-indicators .indicator-btn .indicator-dot {
        width: 3px;
        height: 3px;
        left: 6px;
    }
    
    .modern-indicators .indicator-btn .indicator-tooltip {
        font-size: 11px;
        padding: 6px 10px;
        max-width: 200px;
        word-wrap: break-word;
    }
}

@media (max-width: 480px) {
    .modern-indicators {
        gap: 0.3rem;
    }
    
    .modern-indicators .indicator-btn {
        width: 30px;
        height: 3px;
    }
    
    .modern-indicators .indicator-btn .indicator-tooltip {
        display: none; /* Hide tooltips on very small screens */
    }
}

/* Modern carousel controls */
.carousel-control-prev,
.carousel-control-next {
    width: 8%;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
    border-radius: 50%;
    padding: 2rem;
    background-size: 40%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Smooth entrance animations for content */
.carousel-item.active .category-badge {
    animation: slideInFromTop 0.8s ease-out 0.2s both;
}

.carousel-item.active .slide-title {
    animation: slideInFromBottom 0.8s ease-out 0.4s both;
}

.carousel-item.active .slide-meta {
    animation: slideInFromLeft 0.8s ease-out 0.6s both;
}

.carousel-item.active .slide-actions {
    animation: slideInFromRight 0.8s ease-out 0.8s both;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .carousel-item.active .hero-image {
        animation: none;
    }
    
    .carousel-item.active .category-badge,
    .carousel-item.active .slide-title,
    .carousel-item.active .slide-meta,
    .carousel-item.active .slide-actions {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .btn-read,
    .btn-share,
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        transition: none;
    }
}

/* Remove all potential borders from carousel caption and its children */
.carousel-caption,
.carousel-caption *,
.carousel-caption .category-badge,
.carousel-caption .slide-title,
.carousel-caption .slide-meta,
.carousel-caption .meta-item,
.carousel-caption .slide-actions,
.carousel-caption .btn {
    border: none !important;
    outline: none !important;
}

/* Enhanced responsive design */
@media (max-width: 768px) {
    .hero-carousel {
        height: 60vh;
        min-height: 400px;
    }
    
    .carousel-item img {
        height: 60vh;
        min-height: 400px;
    }
    
    .carousel-caption {
        bottom: 20px;
        left: 15px;
        right: 15px;
        padding: 1.5rem;
        max-width: none;
    }
    
    .category-badge {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .slide-title {
        font-size: 1.4rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }
    
    .slide-meta {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .btn-read, .btn-share {
        padding: 0.6rem 1.5rem;
        font-size: 0.8rem;
        margin: 0 0.25rem;
    }
    
    .slide-actions {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 30px;
        height: 30px;
    }
    
    .carousel-indicators {
        margin-bottom: 1rem;
    }
    
    .carousel-indicators button {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 480px) {
    .hero-carousel {
        height: 50vh;
        min-height: 350px;
    }
    
    .carousel-item img {
        height: 50vh;
        min-height: 350px;
    }
    
    .carousel-caption {
        bottom: 15px;
        left: 10px;
        right: 10px;
        padding: 1rem;
    }
    
    .slide-title {
        font-size: 1.2rem;
        line-height: 1.2;
    }
    
    .slide-meta {
        font-size: 0.75rem;
    }
    
    .btn-read, .btn-share {
        padding: 0.5rem 1.2rem;
        font-size: 0.75rem;
    }
}

/* Specific caption fixes to prevent black lines */
.carousel-caption::before,
.carousel-caption::after {
    display: none !important;
    content: none !important;
    border: none !important;
}

/* Mobile specific caption fixes */
@media (max-width: 768px) {
    .carousel-caption {
        background: rgba(0, 0, 0, 0.1) !important; /* Very light on mobile */
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
    }
}

/* Performance optimizations */
.hero-carousel {
    will-change: transform;
}

.carousel-item img {
    will-change: transform;
    image-rendering: high-quality;
    image-rendering: -webkit-optimize-contrast;
}

/* Simple loading state without overlay effects */
.carousel-item.loading img {
    opacity: 0;
}

.carousel-item:not(.loading) img {
    opacity: 1;
}

/* Enhanced accessibility */
.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero-carousel:hover .carousel-control-prev,
.hero-carousel:hover .carousel-control-next {
    opacity: 1;
}

.carousel-control-prev:focus,
.carousel-control-next:focus {
    opacity: 1;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Enhanced indicators styling */
.carousel-indicators button:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.carousel-indicators button:hover {
    background-color: rgba(255, 255, 255, 0.7);
    transform: scale(1.1);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .carousel-caption {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .btn-read {
        background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
    }
    
    .btn-share {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }
}

/* Print styles */
@media print {
    .hero-carousel {
        display: none;
    }
}
