:root {
    --primary-color: #0e5a8a;  /* Assuming this is var(--prime-one) */
    --secondary-color: #1a4758; /* Assuming this is var(--prime-three) */
    --tertiary-color: #f5f9fa;  /* Assuming this is var(--prime-five) */
    --heading-font: 'GorditaMedium', sans-serif;
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --box-shadow-light: 0 10px 25px rgba(0, 0, 0, 0.1);
    --box-shadow-medium: 0 15px 35px rgba(0, 0, 0, 0.15);
}


/* Enhanced Hero Banner */
.hero-banner {
    position: relative;
    margin-top: 7%;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: var(--tertiary-color);
}

/* Carousel Enhancements */
.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.carousel-item {
    height: 100vh;
    position: relative;
}

/* Enhanced Video Treatment */
.carousel-item video {
    object-fit: cover;
    width: 100%;
    height: 100%;
    transform: scale(1.05);
    transition: transform 6s ease-in-out;
    filter: brightness(0.9); /* Slightly darker video */
}

.carousel-item.active video {
    transform: scale(1);
}

/* Updated Overlay with Darker Background */
.carousel-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.189); /* Black overlay with opacity */
    z-index: 2;
}

/* Content Container with Centered Positioning */
.carousel-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center; /* Center the content */
    padding: 0; /* Remove padding */
}

/* Glass Effect Container */
.heading-container {
    /* background: rgba(0, 0, 0, 0.3); */
    /* backdrop-filter: blur(5px); */
    /* -webkit-backdrop-filter: blur(5px); */
    border-radius: 16px;
    margin-left: -45%;
    padding: 3.5rem 3rem;
    max-width: 650px;
    width: 90%;
    transform: translateY(0);
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
    text-align: center; /* Center the text */
}

/* Decorative elements */
.heading-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    /* background: linear-gradient(90deg, var(--primary-color), transparent); */
}

/* Enhanced Typography */
.hero-heading {
    font-family: var(--heading-font);
    font-size: 2.8rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    line-height: 1.2;
    position: relative;
}

/* Updated for line-by-line animation */
.hero-heading span {
    color:#1ba3f9;
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
    position: relative;
    opacity: 0;
    animation: fadeInLine 0.8s forwards 0.2s; /* First line animation */
}

.hero-heading .second-line {
    color: var(--tertiary-color);
    font-weight: 500;
    opacity: 0;
    animation: fadeInLine 0.8s forwards 0.8s; /* Second line animation */
}

/* Line-by-line fade in animation */
@keyframes fadeInLine {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Advanced Button Styling */
.button-group {
    display: flex;
    justify-content: center; /* Center the buttons */
    gap: 20px;
    position: relative;
    z-index: 4;
}

.hero-btn {
    font-family: var(--heading-font);
    font-size: 1rem;
    color: #ffffff;
    background: var(--primary-color);
    border-radius: 12px;
    padding: 1rem 2rem;
    text-decoration: none;
    transition: all var(--transition-fast);
    display: inline-block;
    border: 2px solid transparent;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: var(--box-shadow-light);
    opacity: 0;
    animation: fadeInButton 0.8s forwards 1.4s; /* Button appears last */
}

@keyframes fadeInButton {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Animation */
.hero-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.4s;
    z-index: -1;
}

.hero-btn:hover {
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(14, 90, 138, 0.3);
}

.hero-btn:hover::before {
    left: 100%;
}

/* Enhanced Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    z-index: 5;
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-fast);
    margin: 0 1.5rem;
}

.hero-banner:hover .carousel-control-prev,
.hero-banner:hover .carousel-control-next {
    opacity: 0.8;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1 !important;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* Indicators with Animation */
.carousel-indicators {
    z-index: 6;
    margin-bottom: 2rem;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    margin: 0 6px;
    transition: all var(--transition-fast);
}

.carousel-indicators .active {
    background-color: var(--primary-color);
    width: 30px;
    border-radius: 6px;
}
.animate-container {
    animation: scaleIn 0.7s forwards;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Styles - Enhanced and Simplified */
@media (max-width: 1200px) {
    .heading-container {
        padding: 3rem 2.5rem;
        max-width: 600px;
    }
    
    .hero-heading {
        font-size: 2.6rem;
    }
}

@media (max-width: 991px) {
    .hero-banner, .carousel-item {
        height: 90vh;
    }
    
    .heading-container {
        padding: 2.5rem 2rem;
        max-width: 500px;
    }
    
    .hero-heading {
        font-size: 2.2rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-btn {
        padding: 0.9rem 1.7rem;
    }
}

@media (max-width: 767px) {
    .hero-banner, .carousel-item {
        height: 80vh;
    }
    
    .heading-container {
        padding: 2rem 1.5rem;
        width: 85%;
        max-width: none;
    }
    
    .hero-heading {
        font-size: 2rem;
        margin-bottom: 1.2rem;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
        margin: 0 1rem;
    }
    
    .carousel-item video {
        object-position: center;
    }
}

@media (max-width: 576px) {
    .hero-banner, .carousel-item {
        height: 75vh;
    }
    
    .heading-container {
        padding: 1.8rem 1.3rem;
        width: 90%;
    }
    
    .hero-heading {
        font-size: 1.7rem;
        margin-bottom: 1rem;
    }
    
    .hero-heading span {
        margin-bottom: 0.3rem;
    }
    
    .hero-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .button-group {
        justify-content: center;
    }
    
    .carousel-indicators [data-bs-target] {
        width: 10px;
        height: 10px;
        margin: 0 4px;
    }
    
    .carousel-indicators .active {
        width: 20px;
    }
}

@media (max-width: 480px) {
    .hero-banner, .carousel-item {
        height: 70vh;
    }
    
    .heading-container {
        padding: 1.5rem 1rem;
        border-radius: 12px;
    }
    
    .hero-heading {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
        border-radius: 8px;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 35px;
        height: 35px;
        margin: 0 0.5rem;
    }
}

/* Portrait Phones */
@media (max-width: 320px) {
    .hero-heading {
        font-size: 1.3rem;
    }
    
    .hero-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}

/* Landscape Mode */
@media (max-height: 480px) and (orientation: landscape) {
    .hero-banner, .carousel-item {
        height: 100vh;
    }
    
    .heading-container {
        padding: 1.5rem;
        max-width: 450px;
    }
    
    .hero-heading {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }
    
    .button-group {
        margin-top: 0.5rem;
    }
}

/* Optimization for Touch Devices */
@media (hover: none) {
    .hero-btn:hover {
        transform: none;
        box-shadow: var(--box-shadow-light);
    }
    
    .hero-btn:active {
        transform: translateY(-2px);
    }
    
    .hero-btn::before {
        display: none;
    }
    
    .hero-banner:hover .carousel-control-prev,
    .hero-banner:hover .carousel-control-next {
        opacity: 0.8;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        opacity: 0.8;
    }
}

/* Notched Phone Support */
@supports (padding: max(0px)) {
    .hero-banner {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .carousel-item video {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Fix for very tall screens */
@media (min-height: 1000px) {
    .heading-container {
        max-width: 700px;
    }
    
    .hero-heading {
        font-size: 3rem;
    }
}