/* ==========================================================================
   Bootstrap 4 -> 5 compatibility layer
   The Porto 7 theme and existing page content were written for Bootstrap 4.
   This file restores the Bootstrap 4 behaviour they rely on, on top of 5.3.
   ========================================================================== */

/* Reboot: BS5 underlines all links; BS4 did not */
a{text-decoration:none}
a:hover{text-decoration:underline}
a.btn:hover,.dropdown-item:hover,.nav-link:hover,.cc-page a:hover,.cc-footer a.cc-social:hover{text-decoration:none}

/* Grid: BS4 gutters were 30px (BS5 = 24px). Keep layout identical. */
.row:not([class*="g-"]):not([class*="gx-"]){--bs-gutter-x:30px}
@media(min-width:1400px){.container{max-width:1210px}}

/* Selects styled with .form-control (BS5 moved this to .form-select) */
select.form-control:not([multiple]):not([size]){
  -webkit-appearance:none;appearance:none;padding-right:2.25rem;
  background:var(--bs-body-bg) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat right .75rem center/16px 12px}
.form-group{margin-bottom:1rem}
.form-row{display:flex;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}
.form-row>.col,.form-row>[class*="col-"]{padding-right:5px;padding-left:5px}
.form-inline{display:flex;flex-flow:row wrap;align-items:center}
.input-group-append,.input-group-prepend{display:flex}
.custom-select{display:block;width:100%}
label{display:inline-block;margin-bottom:.5rem}

/* Buttons & badges */
.btn-block{display:block;width:100%}
.btn-block+.btn-block{margin-top:.5rem}
.badge-pill{border-radius:10rem;padding-right:.6em;padding-left:.6em}
.badge-primary{color:#fff;background-color:var(--bs-primary)}
.badge-secondary{color:#fff;background-color:var(--bs-secondary)}
.badge-success{color:#fff;background-color:var(--bs-success)}
.badge-danger{color:#fff;background-color:var(--bs-danger)}
.badge-warning{color:#212529;background-color:var(--bs-warning)}
.badge-info{color:#212529;background-color:var(--bs-info)}
.badge-light{color:#212529;background-color:var(--bs-light)}
.badge-dark{color:#fff;background-color:var(--bs-dark)}

/* Renamed utilities (BS4 name -> BS5 behaviour) */
.ml-auto{margin-left:auto!important}.mr-auto{margin-right:auto!important}
.ml-0{margin-left:0!important}.mr-0{margin-right:0!important}
.ml-1{margin-left:.25rem!important}.mr-1{margin-right:.25rem!important}
.ml-2{margin-left:.5rem!important}.mr-2{margin-right:.5rem!important}
.ml-3{margin-left:1rem!important}.mr-3{margin-right:1rem!important}
.ml-4{margin-left:1.5rem!important}.mr-4{margin-right:1.5rem!important}
.ml-5{margin-left:3rem!important}.mr-5{margin-right:3rem!important}
.pl-0{padding-left:0!important}.pr-0{padding-right:0!important}
.pl-1{padding-left:.25rem!important}.pr-1{padding-right:.25rem!important}
.pl-2{padding-left:.5rem!important}.pr-2{padding-right:.5rem!important}
.pl-3{padding-left:1rem!important}.pr-3{padding-right:1rem!important}
.pl-4{padding-left:1.5rem!important}.pr-4{padding-right:1.5rem!important}
.pl-5{padding-left:3rem!important}.pr-5{padding-right:3rem!important}
@media(min-width:768px){.ml-md-auto{margin-left:auto!important}.mr-md-auto{margin-right:auto!important}.text-md-left{text-align:left!important}.text-md-right{text-align:right!important}}
@media(min-width:992px){.ml-lg-auto{margin-left:auto!important}.mr-lg-auto{margin-right:auto!important}.text-lg-left{text-align:left!important}.text-lg-right{text-align:right!important}}
.text-left{text-align:left!important}.text-right{text-align:right!important}
.float-left{float:left!important}.float-right{float:right!important}
.font-weight-light{font-weight:300!important}.font-weight-normal{font-weight:400!important}
.font-weight-bold{font-weight:700!important}.font-weight-bolder{font-weight:bolder!important}
.font-italic{font-style:italic!important}
.text-monospace{font-family:var(--bs-font-monospace)!important}
.rounded-left{border-top-left-radius:.25rem!important;border-bottom-left-radius:.25rem!important}
.rounded-right{border-top-right-radius:.25rem!important;border-bottom-right-radius:.25rem!important}
.border-left{border-left:1px solid #dee2e6!important}.border-right{border-right:1px solid #dee2e6!important}
.border-left-0{border-left:0!important}.border-right-0{border-right:0!important}
.no-gutters{--bs-gutter-x:0;margin-right:0;margin-left:0}
.no-gutters>.col,.no-gutters>[class*="col-"]{padding-right:0;padding-left:0}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}
.embed-responsive::before{display:block;content:""}
.embed-responsive-16by9::before{padding-top:56.25%}.embed-responsive-4by3::before{padding-top:75%}
.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}
.media{display:flex;align-items:flex-start}.media-body{flex:1}
.close{float:right;font-size:1.5rem;font-weight:700;line-height:1;color:#000;opacity:.5;background:transparent;border:0}

/* BS5 only ships order-0..5; BS4 had order-0..12 (used by the main nav) */
.order-6{order:6!important}.order-7{order:7!important}.order-8{order:8!important}.order-9{order:9!important}
.order-10{order:10!important}.order-11{order:11!important}.order-12{order:12!important}
