/* Unique Hero Slider with Modern Design */

/* Base container styles */
.hero-slider {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Slider item styling */
.carousel-item {
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Modern overlay only behind text */
.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%; /* Only cover half of the image where text is */
    bottom: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 70%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
}

/* Caption positioning and styling */
.carousel-caption {
    position: absolute;
    left: 5%;
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    width: 60%;
    text-align: left;
    z-index: 2;
    padding: 20px;
    position: relative;
}

/* Text background for better readability */
.carousel-caption::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    backdrop-filter: blur(3px);
    z-index: -1;
}

.carousel-caption h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    display: inline-block;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-caption h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background-color: white;
}

.carousel-caption p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 90%;
    opacity: 0.9;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Modern button design */
.btn-hero {
    background-color: white;
    color: var(--primary-color);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    transition: all 0.4s ease;
    z-index: -1;
}

.btn-hero:hover {
    color: white;
}

.btn-hero:hover::before {
    left: 0;
}

/* Unique progress bar */
.carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: rgba(255, 255, 255, 0.3);
    z-index: 5;
}

.progress-bar {
    height: 100%;
    width: 0;
    background-color: white;
    transition: width 0.1s linear;
}

/* Custom navigation controls */
.carousel-controls {
    position: absolute;
    bottom: 40px;
    right: 50px;
    display: flex;
    z-index: 10;
}

.carousel-control-custom {
    width: 50px;
    height: 50px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-control-custom:hover {
    background-color: var(--primary-color);
}

.carousel-control-custom i {
    color: var(--primary-color);
    font-size: 18px;
    transition: all 0.3s ease;
}

.carousel-control-custom:hover i {
    color: white;
}

/* Remove default Bootstrap controls */
.carousel-control-prev,
.carousel-control-next {
    display: none;
}

/* Custom indicators with counter */
.carousel-indicators {
    position: absolute;
    right: auto;
    left: 5%;
    bottom: 40px;
    margin: 0;
    display: flex;
    align-items: center;
}

.carousel-indicators-counter {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin-right: 20px;
}

.carousel-indicators-counter span {
    color: rgba(255, 255, 255, 0.7);
}

.carousel-indicators [data-bs-target] {
    width: 30px;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: 0;
    margin: 0 5px;
    transition: all 0.3s ease;
    opacity: 1;
}

.carousel-indicators .active {
    background-color: white;
    width: 50px;
}

/* Animation for captions */
@keyframes slideInLeft {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

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

.carousel-item.active .carousel-caption h2 {
    animation: slideInLeft 0.8s forwards;
}

.carousel-item.active .carousel-caption p {
    animation: slideInRight 0.8s 0.3s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.carousel-item.active .carousel-caption .btn-hero {
    animation: fadeInUp 0.8s 0.6s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .carousel-caption {
        width: 70%;
    }
    
    .carousel-caption h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 991px) {
    .carousel-caption {
        width: 80%;
    }
    
    .carousel-caption h2 {
        font-size: 2.2rem;
    }
    
    .carousel-caption p {
        font-size: 1.1rem;
    }
    
    .carousel-controls {
        bottom: 30px;
        right: 30px;
    }
    
    .carousel-control-custom {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 767px) {
    .carousel-caption {
        width: 90%;
    }
    
    .carousel-caption h2 {
        font-size: 1.8rem;
    }
    
    .carousel-caption p {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .btn-hero {
        padding: 10px 25px;
    }
    
    .carousel-indicators {
        bottom: 30px;
    }
    
    .carousel-controls {
        bottom: 20px;
        right: 20px;
    }
    
    .carousel-control-custom {
        width: 40px;
        height: 40px;
        margin-left: 10px;
    }
}

@media (max-width: 575px) {
    .carousel-item::before {
        width: 70%; /* Wider overlay for better text readability on mobile */
        background: linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 80%, rgba(0, 0, 0, 0) 100%);
    }
    
    .carousel-caption {
        top: 45%;
    }
    
    .carousel-caption h2 {
        font-size: 1.5rem;
    }
    
    .carousel-caption h2::after {
        width: 50px;
        height: 3px;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
    
    .btn-hero {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
    
    .carousel-indicators {
        bottom: 20px;
        left: 20px;
    }
    
    .carousel-indicators-counter {
        font-size: 1rem;
        margin-right: 15px;
    }
    
    .carousel-indicators [data-bs-target] {
        width: 20px;
    }
    
    .carousel-indicators .active {
        width: 35px;
    }
    
    .carousel-controls {
        bottom: 20px;
        right: 20px;
    }
    
    .carousel-control-custom {
        width: 35px;
        height: 35px;
    }
}

/* For very small screens */
@media (max-width: 360px) {
    .carousel-caption h2 {
        font-size: 1.3rem;
    }
    
    .carousel-caption p {
        font-size: 0.85rem;
    }
    
    .carousel-indicators,
    .carousel-controls {
        bottom: 15px;
    }
    
    .carousel-indicators {
        left: 15px;
    }
    
    .carousel-controls {
        right: 15px;
    }
}
