/**
 * Enhanced Hero Slider CSS - Bottom-Positioned Text Design
 * Modern carousel with improved positioning and responsive design
 */

:root {
    --primary-color: #f26522;
    --dark-bg: #20212b;
    --transition: all 0.3s ease;
}

/*******************************/
/********** Hero CSS ***********/
/*******************************/

.carousel {
    position: relative;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    background: transparent;
    margin-bottom: 45px;
    overflow: hidden;
}

.carousel .container-fluid {
    padding: 0;
}

.carousel .carousel-item {
    position: relative;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-direction: column;
}

.carousel .carousel-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    overflow: hidden;
    z-index: 0;
}

.carousel .carousel-img::after {
    position: absolute;
    content: "";
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    /* background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.2) 100%); */
    z-index: 1;
    transition: all 0.8s ease-in-out;
}

.carousel .carousel-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.0);
    transition: transform 12s ease-out;
    animation: subtleZoom 12s ease-in-out infinite alternate;
}

@keyframes subtleZoom {
    0% {
        transform: scale(1.0);
    }
    100% {
        transform: scale(1.05);
    }
}

.carousel .carousel-text {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    max-width: 800px;
    width: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 3;
    text-align: center;
    padding: 25px;
    opacity: 0;
    animation: textEntrance 0.9s ease-out 0.2s forwards;
}

/* Reset animation states for fresh animations on each slide */
.carousel .owl-item:not(.active) .carousel-text {
    opacity: 0;
    transform: translateX(-50%) translateY(50px) scale(0.95);
    animation: none;
}

.carousel .owl-item:not(.active) .carousel-text h1 {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    animation: none;
}

.carousel .owl-item:not(.active) .carousel-text p {
    opacity: 0;
    transform: translateY(25px);
    animation: none;
}

.carousel .owl-item:not(.active) .carousel-btn {
    opacity: 0;
    transform: translateY(20px);
    animation: none;
}

@keyframes textEntrance {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(50px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.carousel .carousel-text h1 {
    text-align: center;
    color: #ffffff;
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    letter-spacing: -0.01em;
    opacity: 0;
    transform: translateY(30px);
    animation: titleSlide 0.8s ease-out 0.4s forwards;
}

@keyframes titleSlide {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.carousel .carousel-text p {
    color: #ffffff;
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 600px;
    font-weight: 400;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.7);
    letter-spacing: 0.01em;
    opacity: 0;
    transform: translateY(25px);
    animation: descriptionFade 0.8s ease-out 0.6s forwards;
}

@keyframes descriptionFade {
    0% {
        opacity: 0;
        transform: translateY(25px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel .carousel-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(20px);
    animation: buttonsSlide 0.8s ease-out 0.8s forwards;
}

@keyframes buttonsSlide {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel .carousel-btn .btn,
.carousel .carousel-btn .btn.btn-custom {
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #f26522 0%, #ff8c42 100%);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 14px 32px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(242, 101, 34, 0.3);
    font-size: 13px;
    text-decoration: none;
    display: inline-block;
}

.carousel .carousel-btn .btn:hover,
.carousel .carousel-btn .btn.btn-custom:hover {
    color: #ffffff;
    background: transparent;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.carousel .carousel-btn .btn.btn-play {
    background: rgba(242, 101, 34, 0.9);
    border: 2px solid #f26522;
}

.carousel .carousel-btn .btn.btn-play:hover {
    background: #f26522;
    color: #ffffff;
    border-color: #f26522;
}

.carousel .owl-nav {
    position: absolute;
    width: 100%;
    height: 60px;
    top: calc(50% - 30px);
    left: 0;
    display: flex;
    justify-content: space-between;
    z-index: 9;
    padding: 0 30px;
}

.carousel .owl-nav .owl-prev,
.carousel .owl-nav .owl-next {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    font-size: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.carousel .owl-nav .owl-prev:hover,
.carousel .owl-nav .owl-next:hover {
    color: #ffffff;
    background: rgba(242, 101, 34, 0.95);
    border-color: #f26522;
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(242, 101, 34, 0.5);
}

.carousel .owl-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 12px;
}

.carousel .owl-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.carousel .owl-dot.active {
    background: #f26522;
    transform: scale(1.3);
    border-color: #f26522;
    box-shadow: 0 0 10px rgba(242, 101, 34, 0.6);
}

.carousel .animated {
    -webkit-animation-duration: 1s;
    animation-duration: 1s;
}

/* Video Modal */
#videoModal .modal-dialog {
    position: relative;
    max-width: 800px;
    margin: 60px auto 0 auto;
}

#videoModal .modal-body {
    position: relative;
    padding: 0px;
}

#videoModal .close {
    position: absolute;
    width: 30px;
    height: 30px;
    right: 0px;
    top: -30px;
    z-index: 999;
    font-size: 30px;
    font-weight: normal;
    color: #ffffff;
    background: #000000;
    opacity: 1;
    border: none;
    border-radius: 0;
}

/*******************************/
/*** Hero Responsive Design ***/
/*******************************/

@media (max-width: 991.98px) {
    .carousel .carousel-text {
        bottom: 12%;
        max-width: none;
        width: calc(100% - 60px);
        left: 50%;
        transform: translateX(-50%);
        padding: 20px 30px;
    }
    
    .carousel .carousel-text h1 {
        font-size: 2.5rem;
        margin-bottom: 18px;
        line-height: 1.3;
    }

    .carousel .carousel-text p {
        font-size: 1.1rem;
        margin-bottom: 25px;
        line-height: 1.5;
    }

    .carousel .carousel-btn .btn {
        padding: 12px 28px;
        font-size: 13px;
    }
    
    .carousel .owl-nav .owl-prev,
    .carousel .owl-nav .owl-next {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .carousel .owl-dots {
        bottom: 30px;
    }
}

@media (max-width: 767.98px) {
    .carousel .carousel-text {
        bottom: 10%;
        max-width: none;
        width: calc(100% - 40px);
        left: 50%;
        transform: translateX(-50%);
        padding: 18px 20px;
    }
    
    .carousel .carousel-text h1 {
        font-size: 2.2rem;
        margin-bottom: 15px;
        line-height: 1.3;
    }
    
    .carousel .carousel-text p {
        font-size: 1rem;
        margin-bottom: 22px;
        line-height: 1.5;
    }

    .carousel .carousel-btn {
        gap: 15px;
    }

    .carousel .carousel-btn .btn {
        padding: 10px 24px;
        font-size: 12px;
    }
    
    .carousel .owl-nav .owl-prev,
    .carousel .owl-nav .owl-next {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .carousel .owl-dots {
        bottom: 25px;
    }
}

@media (max-width: 575.98px) {
    .carousel .carousel-text {
        bottom: 8%;
        max-width: none;
        width: calc(100% - 30px);
        left: 50%;
        transform: translateX(-50%);
        padding: 15px 15px;
    }
    
    .carousel .carousel-text h1 {
        font-size: 1.9rem;
        margin-bottom: 12px;
        line-height: 1.3;
    }
    
    .carousel .carousel-text p {
        font-size: 0.95rem;
        margin-bottom: 20px;
        line-height: 1.4;
    }

    .carousel .carousel-btn {
        gap: 10px;
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .carousel .carousel-btn .btn {
        padding: 10px 18px;
        font-size: 11px;
        flex: 1;
        min-width: 130px;
        max-width: 160px;
        text-align: center;
        white-space: nowrap;
    }
    
    .carousel .owl-nav .owl-prev,
    .carousel .owl-nav .owl-next {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .carousel .owl-nav {
        top: calc(50% - 20px);
        padding: 0 20px;
    }

    .carousel .owl-dots {
        bottom: 20px;
    }
}

/*******************************/
/* Height-Based Viewport Fixes */
/*******************************/

@media (max-height: 700px) {
    .carousel .carousel-text {
        bottom: 8%;
    }
    
    .carousel .carousel-text h1 {
        font-size: 2.2rem !important;
        margin-bottom: 12px !important;
    }
    
    .carousel .carousel-text p {
        font-size: 1rem !important;
        margin-bottom: 18px !important;
    }
    
    .carousel .carousel-btn .btn {
        padding: 10px 22px !important;
        font-size: 12px !important;
    }
}

@media (max-height: 600px) {
    .carousel .carousel-text {
        bottom: 5%;
    }
    
    .carousel .carousel-text h1 {
        font-size: 1.9rem !important;
        margin-bottom: 10px !important;
    }
    
    .carousel .carousel-text p {
        font-size: 0.9rem !important;
        margin-bottom: 15px !important;
    }
    
    .carousel .carousel-btn .btn {
        padding: 8px 20px !important;
        font-size: 11px !important;
    }
}

@media (max-height: 500px) {
    .carousel .carousel-text {
        bottom: 3%;
        transform: translateX(-50%) scale(0.9) !important;
    }
    
    .carousel .carousel-text h1 {
        font-size: 1.7rem !important;
        margin-bottom: 8px !important;
    }
    
    .carousel .carousel-text p {
        font-size: 0.85rem !important;
        margin-bottom: 12px !important;
        display: none; /* Hide description on very small heights */
    }
    
    .carousel .carousel-btn .btn {
        padding: 7px 18px !important;
        font-size: 11px !important;
    }
}

/* Landscape mode adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .carousel .carousel-text {
        bottom: 5%;
        max-width: 80% !important;
    }
    
    .carousel .carousel-text h1 {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
        margin-bottom: 8px !important;
    }
    
    .carousel .carousel-text p {
        font-size: 0.9rem !important;
        line-height: 1.3 !important;
        margin-bottom: 12px !important;
    }
    
    .carousel .carousel-btn .btn {
        padding: 8px 20px !important;
        font-size: 11px !important;
    }
}