#hero {
    height: 750px;
    position: relative;
    overflow: hidden;
    background: #0A1D37;
}

.carousel,
.carousel-inner,
.carousel-item {
    height: 100%;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
    transition: transform 12s linear;
}

.carousel-item.active .hero-bg {
    transform: scale(1.1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(10, 29, 55, 0.6) 0%, rgba(10, 29, 55, 0.1) 100%);
    z-index: 1;
}

.carousel-item {
    transition: transform 0.8s ease-in-out;
}

.text-shadow-premium {
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.5);
}

.text-shadow-soft {
    text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.3);
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    opacity: 0.8;
    transition: all 0.3s ease;
    margin: 0 40px;
    z-index: 10;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: #232864;
    border-color: #232864;
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.carousel-indicators {
    z-index: 10;
    bottom: 30px;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid transparent;
    transition: all 0.3s ease;
    margin: 0 6px;
}

.carousel-indicators button.active {
    background: #121541;
    border-color: rgb(35, 40, 100);
    transform: scale(1.2);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    #hero { height: 600px; }
    .carousel-item h1.display-1 {
        font-size: 3.5rem !important;
    }
    .carousel-control-prev, .carousel-control-next {
        margin: 0;
        right: 10px;
    }
    .carousel-control-prev {
        left: 10px;
        right: auto;
    }
}

@media (max-width: 768px) {
    #hero { height: 500px; }
    .carousel-item.active {
        display: flex !important;
        align-items: center;
    }
    .carousel-item h1.display-1 {
        font-size: 2.0rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1.2rem !important;
    }
    .carousel-item p.lead {
        font-size: 1rem !important;
        margin-bottom: 2rem !important;
    }
    /* Tăng độ đậm của overlay trên mobile để text dễ đọc hơn */
    .hero-bg::after {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(10, 29, 55, 0.4);
    }
    .carousel-control-prev, .carousel-control-next {
        display: none !important; /* Ẩn nút mũi tên trên điện thoại */
    }
}

/* Custom form-select style */
.form-select, .form-control {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border-radius: 12px !important;
    padding: 0.8rem 1rem !important;
    transition: all 0.3s ease;
}

.form-select:focus, .form-control:focus {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
    background-size: 16px 12px !important;
}

.form-select option, .form-select option:first-child, .form-select option:disabled {
    background-color: #0A1D37 !important;
    color: white !important;
}

.form-select {
    width: 100% !important;
    max-width: calc(100vw - 60px) !important; /* Giới hạn cứng theo chiều ngang màn hình trừ đi lề */
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    box-sizing: border-box !important;
    display: block;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

@media (max-width: 576px) {
    .form-select {
        max-width: calc(100vw - 40px) !important;
        padding-right: 2.2rem !important;
        font-size: 0.9rem !important; /* Thu nhỏ chữ một chút trên mobile để đỡ chiếm chỗ */
    }
}