/**
 * Bootstrap 5 Compatibility Overrides
 * 
 * This file provides compatibility shims and styling adjustments
 * to maintain visual consistency when migrating from Bootstrap 4 to Bootstrap 5.
 */

/* ==========================================================================
   Bootstrap 4 Compatibility Classes
   ========================================================================== */


/** Replicate no-gutters behavior in bootstrap 4 */
.row.no-gutters {
    margin-right: 0;
    margin-left: 0;
}

.row.no-gutters > .col,
.row.no-gutters > [class*="col-"] {
    padding-right: 0;
    padding-left: 0;
}

/** Stay close to container width **/
@media (min-width: 1200px) {
    .container, .container-lg, .container-md, .container-sm, .container-xl {
        max-width: 1140px;
    }
}

/** Font italic and family behavior in aboutus **/
.font-italic {
    font-style: italic !important;
}

.font-size-large {
    font-size: 2em;
    line-height: 1.5em;
}

.fonts-Times {
    font-family: Times, Georgia, 'Times New Roman', serif;
}

@media (min-width: 992px) {
}

@media (min-width: 992px) {
    .nav-pills-custom .nav-link::before {
        right: -8px !important;
    }
}

/** */
.sidemenu-link {
    position: relative;
}

@media (min-width: 992px) {
}

/* Text Alignment - Bootstrap 4 compatibility */
.text-left {
    text-align: left !important;
}

.text-right {
    text-align: right !important;
}

.text-center {
    text-align: center !important;
}

/* Float utilities - Bootstrap 4 compatibility */
.float-left {
    float: left !important;
}

.float-right {
    float: right !important;
}

/* Form groups - Bootstrap 4 compatibility (if needed) */
.form-group {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
}

/* ==========================================================================
   Carousel Styling Adjustments
   ========================================================================== */

/* Ensure carousel transitions work smoothly with Bootstrap 5 */
/*#carousel-area .carousel-item {*/
/*    transition: transform 0.6s ease-in-out;*/
/*}*/

/*!* Maintain carousel control styling *!*/
/*#carousel-area .carousel-control-prev,*/
/*#carousel-area .carousel-control-next {*/
/*    opacity: 0.8;*/
/*}*/

/*#carousel-area .carousel-control-prev:hover,*/
/*#carousel-area .carousel-control-next:hover {*/
/*    opacity: 1;*/
/*}*/

/*!* Carousel indicators *!*/
/*#carousel-area .carousel-indicators {*/
/*    bottom: 20px;*/
/*}*/

/*#carousel-area .carousel-indicators [data-bs-target] {*/
/*    width: 10px;*/
/*    height: 10px;*/
/*    border-radius: 50%;*/
/*    margin: 0 5px;*/
/*}*/

/* ==========================================================================
   Card and Accordion Adjustments
   ========================================================================== */

/* Ensure accordion styling matches Bootstrap 4 appearance */
.accordion-button:not(.collapsed) {
    background-color: #e9ecef;
    color: #000;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0, 0, 0, .125);
}

/* Card styling consistency */
.card {
    border: 1px solid rgba(0, 0, 0, .125);
}

.card-header {
    padding: 0.75rem 1.25rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, .125);
}

.card-body {
    padding: 1.25rem;
}

/* ==========================================================================
   Navigation and Tabs
   ========================================================================== */

/* Nav pills styling */
.nav-pills .nav-link {
    border-radius: 0.25rem;
}

.nav-pills .nav-link.active {
    background-color: #007bff;
}

/* Navbar adjustments */
.navbar-toggler {
    padding: 0.25rem 0.75rem;
    font-size: 1.25rem;
    border: 1px solid transparent;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ==========================================================================
   Utility Overrides
   ========================================================================== */

/* Ensure consistent spacing */
.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-1 {
    margin-top: 0.25rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

/* ==========================================================================
   Button Adjustments
   ========================================================================== */

/* Ensure button styling consistency */
.btn {
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
}

.btn-link {
    font-weight: 400;
    color: #007bff;
    text-decoration: none;
}

.btn-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.btn-link:focus {
    text-decoration: underline;
}

/* ==========================================================================
   Breadcrumb Adjustments
   ========================================================================== */

.breadcrumb {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    color: #6c757d;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* ==========================================================================
   Collapse/Accordion Enhancements
   ========================================================================== */

/* Smooth collapse transitions */
.collapse {
    transition: height 0.35s ease;
}

.collapsing {
    transition: height 0.35s ease;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

/* Ensure mobile navbar works correctly */
@media (max-width: 991.98px) {
    .navbar-collapse {
        padding: 1rem 0;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 0;
    }
}

/* ==========================================================================
   Custom Site Overrides
   ========================================================================== */

/* Any additional site-specific styling adjustments go here */

/* Ensure carousel captions maintain positioning */
#carousel-area .carousel-caption {
    position: absolute;
    right: 15%;
    bottom: 1.25rem;
    left: 15%;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
    color: #fff;
    text-align: center;
}

/* Fix any z-index issues */
.carousel-control-prev,
.carousel-control-next {
    z-index: 2;
}

.carousel-indicators {
    z-index: 2;
}
