/* ========================================
   BOOTSTRAP CAROUSEL STYLES - PROFENDER
   ======================================== */

/* Main Carousel Container */
#profenderCarousel {
    height: 70vh;
    min-height: 500px;
    position: relative;
    overflow: hidden;
}

/* Individual Slide Styling */
.profender-slide {
    width: 100%;
    height: 70vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Carousel Inner Container */
.carousel-inner {
    height: 100%;
}

.carousel-inner .item {
    height: 100%;
    transition: opacity 0.6s ease-in-out;
}

/* Overlay for text readability - CENTERED TITLE APPROACH */
.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.3) 40%,
        rgba(0, 0, 0, 0.1) 70%,
        rgba(0, 0, 0, 0.7) 100%
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 2rem 6rem 2rem;
}

/* Title section - Top centered */
.carousel-title-section {
    text-align: center;
    z-index: 3;
    width: 100%;
}

/* Large centered title outside box */
.carousel-title {
    font-size: 4rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.8),
        0 4px 8px rgba(0, 0, 0, 0.6),
        0 8px 16px rgba(0, 0, 0, 0.4);
    animation: fadeInDown 1s ease-out;
}

/* Subtitle under title - REMOVED FROM TOP */
/* Subtitle is now inside the content box */

/* Content container - Bottom centered */
.carousel-content {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    z-index: 2;
    position: relative;
}

.carousel-text {
    max-width: 700px;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-top: 4px solid var(--primary-color);
    animation: slideInUp 0.8s ease-out 0.3s both;
    text-align: center;
}

/* Subtitle inside content box */
.carousel-subtitle {
    font-size: 1.4rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.3;
    animation: fadeIn 0.6s ease-out 0.6s both;
}

/* Clean description in bottom box */
.carousel-description {
    font-size: 1.1rem;
    color: #555555;
    margin-bottom: 2rem;
    line-height: 1.7;
    font-weight: 400;
}

/* Minimalist CTA button */
.carousel-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    box-shadow: 0 6px 20px rgba(183, 0, 0, 0.3);
}

.carousel-cta:hover {
    background: #d32f2f;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(183, 0, 0, 0.4);
    color: white;
    text-decoration: none;
}

.carousel-cta i {
    transition: transform 0.3s ease;
}

.carousel-cta:hover i {
    transform: translateX(3px);
}

/* Logo Bottom Right */
.carousel-logo {
    position: absolute;
    bottom: 20px;
    right: 30px;
    z-index: 4;
    animation: fadeIn 0.8s ease-out 1.2s both;
}

.carousel-logo-img {
    max-width: 120px;
    height: auto;
    opacity: 0.85;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.carousel-logo-img:hover {
    opacity: 1;
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

/* Custom Navigation Controls */
.profender-control-prev,
.profender-control-next {
    background: rgba(183, 0, 0, 0.8) !important;
    border-radius: 50%;
    width: 60px !important;
    height: 60px !important;
    top: 50% !important;
    transform: translateY(-50%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.profender-control-prev {
    left: 30px !important;
}

.profender-control-next {
    right: 30px !important;
}

.profender-control-prev:hover,
.profender-control-next:hover {
    background: rgba(183, 0, 0, 1) !important;
    transform: translateY(-50%) scale(1.1);
    border-color: rgba(255, 255, 255, 0.6);
}

.profender-control-prev i,
.profender-control-next i {
    font-size: 24px;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Custom Indicators */
.carousel-indicators {
    bottom: 30px;
    z-index: 15;
}

.carousel-indicators li {
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin: 0 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicators li.active {
    background-color: #b70000;
    border-color: #b70000;
    transform: scale(1.3);
}

.carousel-indicators li:hover {
    background-color: rgba(183, 0, 0, 0.7);
    transform: scale(1.2);
}

/* Animations - TOP AND BOTTOM LAYOUT */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Animation timing for elements */
.carousel-title {
    animation: fadeInDown 1s ease-out 0.2s both;
}

.carousel-text {
    animation: slideInUp 0.8s ease-out 0.3s both;
}

.carousel-subtitle {
    animation: fadeIn 0.6s ease-out 0.6s both;
}

.carousel-description {
    animation: fadeIn 0.6s ease-out 0.8s both;
}

.carousel-cta {
    animation: fadeIn 0.6s ease-out 1s both;
}

/* Responsive Design - SUBTITLE INSIDE CONTENT BOX */
@media (max-width: 1200px) {
    .carousel-title {
        font-size: 3.5rem;
    }
    
    .carousel-text {
        max-width: 650px;
        padding: 2.2rem;
    }
    
    .carousel-subtitle {
        font-size: 1.3rem;
        margin-bottom: 1.3rem;
    }
    
    .carousel-description {
        font-size: 1.05rem;
    }
}

@media (max-width: 768px) {
    #profenderCarousel {
        height: 60vh;
        min-height: 450px;
    }
    
    .profender-slide {
        height: 60vh;
        min-height: 450px;
    }
    
    .carousel-overlay {
        padding: 3rem 1.5rem 4rem 1.5rem;
    }
    
    .carousel-title {
        font-size: 2.8rem;
        margin-bottom: 0.5rem;
    }
    
    .carousel-text {
        max-width: 100%;
        padding: 2rem;
    }
    
    .carousel-subtitle {
        font-size: 1.2rem;
        margin-bottom: 1.2rem;
        letter-spacing: 0.3px;
    }
    
    .carousel-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        line-height: 1.6;
    }
    
    .carousel-cta {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }
    
    .profender-control-prev,
    .profender-control-next {
        width: 50px !important;
        height: 50px !important;
    }
    
    .profender-control-prev {
        left: 15px !important;
    }
    
    .profender-control-next {
        right: 15px !important;
    }
    
    .profender-control-prev i,
    .profender-control-next i {
        font-size: 20px;
    }
    
    .carousel-indicators li {
        width: 12px;
        height: 12px;
        margin: 0 6px;
    }
    
    .carousel-logo {
        bottom: 15px;
        right: 20px;
    }
    
    .carousel-logo-img {
        max-width: 100px;
    }
}

@media (max-width: 480px) {
    .carousel-overlay {
        padding: 2.5rem 1rem 3rem 1rem;
    }
    
    .carousel-title {
        font-size: 2.2rem;
        letter-spacing: 1px;
        margin-bottom: 0.5rem;
    }
    
    .carousel-text {
        padding: 1.8rem;
        border-top-width: 3px;
    }
    
    .carousel-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1rem;
        letter-spacing: 0.2px;
    }
    
    .carousel-description {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 1.3rem;
    }
    
    .carousel-cta {
        padding: 0.8rem 1.8rem;
        font-size: 0.95rem;
    }
    
    .profender-control-prev,
    .profender-control-next {
        width: 45px !important;
        height: 45px !important;
    }
    
    .profender-control-prev i,
    .profender-control-next i {
        font-size: 18px;
    }
    
    .carousel-logo {
        bottom: 12px;
        right: 15px;
    }
    
    .carousel-logo-img {
        max-width: 80px;
        opacity: 0.75;
    }
}

/* Fix for Bootstrap conflicts */
.carousel-control.left,
.carousel-control.right {
    background-image: none !important;
    background: rgba(183, 0, 0, 0.8) !important;
}

/* Ensure proper slide transitions */
.carousel-inner > .item {
    position: relative;
    display: none;
    transition: 0.6s ease-in-out left;
}

.carousel-inner > .active {
    display: block;
}

.carousel-inner > .active.left {
    left: -100%;
}

.carousel-inner > .active.right {
    left: 100%;
}

.carousel-inner > .next {
    position: absolute;
    top: 0;
    width: 100%;
}

.carousel-inner > .next.left,
.carousel-inner > .prev.right {
    left: 0;
}

.carousel-inner > .active.right {
    left: 100%;
}