/*
  Bootstrap 4 compatibility shims for pages migrated to Bootstrap 5.
  Keep this file minimal and page-focused.
*/

/* Bootstrap 5 reintroduces underlined links by default; BS4 didn't.
   Keep existing theme behavior (no underline unless a component requests it). */
.btn-link,
.btn-link:hover,
.btn-link:focus,
.btn-link:focus-visible {
  text-decoration: none;
}
a {
  text-decoration: none;
}

/* The legacy theme uses floated headers. On BS5 pages, ensure the main page container
   starts below floated headers so top-of-page elements (breadcrumb/title) don't get overlapped. */
body > .container {
  clear: both;
}

/* Some pages wrap the main content with feature-level containers (e.g. Anlık Bilgilendirmeler).
   Apply the same float-clearing behavior so breadcrumbs don't sit under the header. */
body > .enerjisa-saha-calismalari {
  clear: both;
}

/* Breadcrumb visibility hardening (BS5 pages only). */
body > .container nav[aria-label="breadcrumb"] {
  display: block;
}
body > .container nav[aria-label="breadcrumb"] > .breadcrumb:not(.mobile-show-600) {
  display: flex;
}

/* Same breadcrumb hardening for pages not using body > .container. */
body > .enerjisa-saha-calismalari nav[aria-label="breadcrumb"] {
  display: block;
}
body > .enerjisa-saha-calismalari nav[aria-label="breadcrumb"] > .breadcrumb:not(.mobile-show-600) {
  display: flex;
}

/* Arama page: the clear/close controls are absolutely positioned.
   Ensure the wrapper establishes a positioning context so they stay inside the input area. */
.search-inputArama {
  position: relative;
}

/* When the header becomes fixed (header-scroll), some pages can end up underneath it
   depending on JS timing/order. Add a CSS fallback for BS5 pages (desktop only). */
@media (min-width: 1000px) {
  /* JS sets inline padding-top on `body > .container` when header becomes fixed.
     Keep a CSS fallback for BS5 pages in case the JS doesn't run/timing differs. */
  .homepage-header.header-scroll ~ .container,
  .header.header-scroll ~ .container,
  .header-fixed ~ .container,
  body > .header.header-scroll ~ .container {
    padding-top: 70px !important;
  }

  /* Same fallback for pages where the main wrapper is not a direct `.container`. */
  .homepage-header.header-scroll ~ .enerjisa-saha-calismalari,
  .header.header-scroll ~ .enerjisa-saha-calismalari,
  .header-fixed ~ .enerjisa-saha-calismalari,
  body > .header.header-scroll ~ .enerjisa-saha-calismalari {
    padding-top: 70px !important;
  }
}

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

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

.ml-auto { margin-left: auto !important; }
.mr-auto { margin-right: auto !important; }

.ml-0 { margin-left: 0 !important; }
.mr-0 { margin-right: 0 !important; }

.pl-0 { padding-left: 0 !important; }
.pr-0 { padding-right: 0 !important; }

/* BS4 -> BS5 accessibility alias */
.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; }

/* Dropdown alignment aliases used by older JS/CSS */
.dropdown-menu-right { right: 0 !important; left: auto !important; }
.dropdown-menu-left { left: 0 !important; right: auto !important; }

/* BS4 full-width button helper */
.btn-block { display: block !important; width: 100% !important; }
