/*!
 * Bootstrap 5 Compatibility Layer for Axadle Theme - OPTIMIZED FOR TOP-NEWS
 * Version: 1.1.0
 * Author: AxadleStudio
 * Author URI: https://alimusa.so/
 * License: ThemeForest Split Licence
 * Copyright: (c) 2025 AxadleStudio
 * 
 * Maintains only USED Bootstrap 4→5 compatibility for top-news theme
 * Optimized version - 70% size reduction from original
 * Part of Axadle Theme v8.1.0 - Professional News & Magazine Theme
 */

/* Bootstrap 5 removed .no-gutters class, replace with .g-0 - Used in theme */
.no-gutters {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
}

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

/* Bootstrap 5 removed .card-deck - Used in news layouts */
.card-deck {
    display: flex;
    flex-direction: column;
}

@media (min-width: 576px) {
    .card-deck {
        flex-flow: row wrap;
        margin-left: -15px;
        margin-right: -15px;
    }
    .card-deck .card {
        flex: 1 0 0%;
        margin-left: 15px;
        margin-right: 15px;
    }
}

/* Form Controls - Updated for Bootstrap 5 compatibility */
.form-control-file {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Float utilities - Bootstrap 5 removed these, still used in theme */
.float-left {
    float: left !important;
}

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

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

/* Text utilities - Bootstrap 5 updated these */
.text-left {
    text-align: left !important;
}

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

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

/* Font weight utilities - Bootstrap 5 changed naming */
.font-weight-light {
    font-weight: 300 !important;
}

.font-weight-normal {
    font-weight: 400 !important;
}

.font-weight-bold {
    font-weight: 700 !important;
}

/* Spacing utilities - Key ones used in top-news theme */
.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-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; }

.pb-1 { padding-bottom: 0.25rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.pb-3 { padding-bottom: 1rem !important; }
.pb-4 { padding-bottom: 1.5rem !important; }
.pb-5 { padding-bottom: 3rem !important; }

.pt-1 { padding-top: 0.25rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pt-3 { padding-top: 1rem !important; }
.pt-4 { padding-top: 1.5rem !important; }
.pt-5 { padding-top: 3rem !important; }

/* Dropdown compatibility - Used in navigation */
.dropdown-menu-left {
    left: 0;
    right: auto;
}

.dropdown-menu-right {
    right: 0;
    left: auto;
}

/* Modal backdrop - Updated for Bootstrap 5 */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

.modal-backdrop.fade {
    opacity: 0;
}

.modal-backdrop.show {
    opacity: 0.5;
}

/* Navbar compatibility - For top-news header */
.navbar-light .navbar-nav .nav-link {
    color: rgba(0, 0, 0, 0.55);
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus {
    color: rgba(0, 0, 0, 0.7);
}

.navbar-light .navbar-nav .nav-link.active {
    color: rgba(0, 0, 0, 0.9);
}