/* Layout Fix for Static Pages */

/* Ensure proper container behavior */
.container {
    position: relative;
    z-index: 1;
}

/* Fix for elements that might overflow */
.card, .alert, .modal, .dropdown-menu {
    position: relative;
    z-index: 10;
}

/* Ensure footer stays at bottom - Fixed version */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Only apply flex: 1 to main content area, not container */
main {
    flex: 1;
}

/* Container should not expand unnecessarily */
.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* Fix for sticky elements */
.sticky-top {
    position: sticky !important;
    top: 0;
    z-index: 1000;
}

/* Fix for navbar */
.navbar {
    position: relative;
    z-index: 1030;
}

/* Fix for modal and overlay issues */
.modal {
    z-index: 1055;
}

.modal-backdrop {
    z-index: 1050;
}

/* Fix for dropdown */
.dropdown-menu {
    z-index: 1000;
}

/* Ensure proper stacking context */
.row {
    position: relative;
    z-index: 1;
}

/* Fix for accordion and collapsible elements */
.accordion-item {
    position: relative;
    z-index: 1;
}

/* Fix for form elements */
.form-control, .form-select, .btn {
    position: relative;
    z-index: 1;
}

/* Fix for any floating elements */
.position-relative {
    position: relative !important;
}

.position-absolute {
    position: absolute !important;
}

/* Ensure proper overflow handling */
.overflow-hidden {
    overflow: hidden !important;
}

/* Fix for any elements that might break layout */
* {
    max-width: 100%;
}

/* Ensure images don't break layout */
img {
    max-width: 100%;
    height: auto;
}

/* Fix for any elements that might cause horizontal scroll */
body, html {
    overflow-x: hidden;
}

/* Ensure proper spacing */
.mb-5 {
    margin-bottom: 3rem !important;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

/* Fix for any elements that might overlap footer */
footer {
    position: relative;
    z-index: 1;
    margin-top: auto;
}

/* Ensure proper container width */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* Fix for any elements that might cause layout issues */
.card-body {
    position: relative;
    z-index: 1;
}

/* Ensure proper text wrapping */
.text-wrap {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Fix for any elements that might cause vertical overflow */
.overflow-auto {
    overflow: auto !important;
}

/* Ensure proper display for flex elements */
.d-flex {
    display: flex !important;
}

/* Fix for any elements that might cause layout shift */
.transition-none {
    transition: none !important;
}

/* Ensure proper positioning for any floating elements */
.float-start {
    float: left !important;
}

.float-end {
    float: right !important;
}

/* Fix for any elements that might cause z-index issues */
.z-index-1 {
    z-index: 1 !important;
}

.z-index-10 {
    z-index: 10 !important;
}

.z-index-100 {
    z-index: 100 !important;
}

.z-index-1000 {
    z-index: 1000 !important;
}
