/* ===========================================
   Bootstrap Replacement — Grid, Utilities & Components
   Replaces bootstrap.min.css with only what this site uses
   =========================================== */

/* ---------- RESET / BOX MODEL ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}

img, svg {
    display: block;
    max-width: 100%;
}

ul, ol {
    padding-left: 2rem;
}

a {
    text-decoration: none;
}

button, input, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* ---------- CONTAINER ---------- */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 12px;
    padding-right: 12px;
}

@media (min-width: 576px)  { .container { max-width: 540px; } }
@media (min-width: 768px)  { .container { max-width: 720px; } }
@media (min-width: 992px)  { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
@media (min-width: 1400px) { .container { max-width: 1320px; } }

.container-fluid {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 12px;
    padding-right: 12px;
}

/* ---------- ROW & COLUMNS ---------- */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -12px;
    margin-right: -12px;
}

.row > * {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-left: 12px;
    padding-right: 12px;
}

/* Gap utility for row */
.g-4 {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}
.g-4 {
    margin-left: calc(-0.75rem);
    margin-right: calc(-0.75rem);
    margin-top: calc(-1.5rem);
}
.g-4 > * {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    margin-top: 1.5rem;
}

/* Base columns (mobile-first: all 100%) */
.col-12 { flex: 0 0 auto; width: 100%; }

/* SM breakpoint */
@media (min-width: 576px) {
    .col-sm-12 { flex: 0 0 auto; width: 100%; }
}

/* MD breakpoint */
@media (min-width: 768px) {
    .col-md-4  { flex: 0 0 auto; width: 33.333333%; }
    .col-md-6  { flex: 0 0 auto; width: 50%; }
    .col-md-12 { flex: 0 0 auto; width: 100%; }
}

/* LG breakpoint */
@media (min-width: 992px) {
    .col-lg-3  { flex: 0 0 auto; width: 25%; }
    .col-lg-6  { flex: 0 0 auto; width: 50%; }
    .col-lg-10 { flex: 0 0 auto; width: 83.333333%; }
}

/* ---------- FLEXBOX UTILITIES ---------- */
.d-flex          { display: flex !important; }
.d-none          { display: none !important; }
.d-block         { display: block !important; }
.d-inline-block  { display: inline-block !important; }
.flex-column     { flex-direction: column !important; }
.flex-row        { flex-direction: row !important; }
.align-items-center   { align-items: center !important; }
.align-items-baseline { align-items: baseline !important; }
.justify-content-center    { justify-content: center !important; }
.justify-content-flex-end  { justify-content: flex-end !important; }
.justify-center            { justify-content: center !important; }

@media (min-width: 992px) {
    .d-lg-flex  { display: flex !important; }
    .d-lg-block { display: block !important; }
    .d-lg-none  { display: none !important; }
}

/* ---------- SPACING UTILITIES ---------- */
/* Margin bottom */
.mb-0    { margin-bottom: 0 !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; }

@media (min-width: 768px) {
    .mb-md-0 { margin-bottom: 0 !important; }
}
@media (min-width: 992px) {
    .mb-lg-0 { margin-bottom: 0 !important; }
}

/* Margin end (right in LTR) */
.me-2    { margin-right: 0.5rem !important; }
.me-4    { margin-right: 1.5rem !important; }

/* Margin start (left in LTR) */
.ms-4    { margin-left: 1.5rem !important; }
.ms-auto { margin-left: auto !important; }

/* Margin top */
.mt-4    { margin-top: 1.5rem !important; }
.mt-5    { margin-top: 3rem !important; }
.mt-auto { margin-top: auto !important; }

/* Margin x-axis auto */
.mx-auto { margin-left: auto !important; margin-right: auto !important; }

/* Margin all */
.m-auto  { margin: auto !important; }

/* Padding */
.py-2    { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.pb-0    { padding-bottom: 0 !important; }

/* ---------- TYPOGRAPHY UTILITIES ---------- */
.text-center  { text-align: center !important; }
.text-white   { color: #fff !important; }
.text-black   { color: #000 !important; }
.text-warning { color: #ffc107 !important; }
.text-danger  { color: #dc3545 !important; }
.text-sm      { font-size: 0.875rem !important; }
.font-bold    { font-weight: 700 !important; }
.uppercase    { text-transform: uppercase !important; }
.leading-1    { line-height: 1 !important; }

/* ---------- SIZING UTILITIES ---------- */
.h-100 { height: 100% !important; }
.w-100 { width: 100% !important; }

/* ---------- BACKGROUND UTILITIES ---------- */
.bg-white   { background-color: #fff !important; }
.bg-warning { background-color: #ffc107 !important; }

/* ---------- SHADOW ---------- */
.shadow-lg { box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; }

/* ---------- BORDER-RADIUS ---------- */
.rounded-md { border-radius: 0.375rem !important; }

/* ---------- IMAGE ---------- */
.img-fluid {
    max-width: 100%;
    height: auto;
}

/* ---------- VISUALLY HIDDEN ---------- */
.visually-hidden {
    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;
}

/* ---------- POSITION ---------- */
.position-relative { position: relative !important; }

/* ===========================================
   COMPONENTS
   =========================================== */

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.375rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
                border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    text-decoration: none;
}

/* ---------- NAVBAR ---------- */
.navbar {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.navbar > .container {
    display: flex;
    flex-wrap: inherit;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    padding-top: 0.3125rem;
    padding-bottom: 0.3125rem;
    margin-right: 1rem;
    white-space: nowrap;
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.navbar-nav .nav-link {
    display: block;
    padding: 0.5rem 0;
    text-decoration: none;
}

.navbar-collapse {
    flex-basis: 100%;
    flex-grow: 1;
    align-items: center;
}

.navbar-toggler {
    padding: 0.25rem 0.75rem;
    font-size: 1.25rem;
    line-height: 1;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: box-shadow 0.15s ease-in-out;
}

.navbar-toggler-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
}

/* Collapse behavior */
.collapse:not(.show) {
    display: none;
}

.collapse.show {
    display: block;
}

/* Navbar expand at LG */
@media (min-width: 992px) {
    .navbar-expand-lg {
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
    .navbar-expand-lg .navbar-nav {
        flex-direction: row;
    }
    .navbar-expand-lg .navbar-nav .nav-link {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
    }
    .navbar-expand-lg .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
    }
    .navbar-expand-lg .navbar-toggler {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .navbar-expand-lg .navbar-collapse {
        /* Collapsed by default on mobile */
    }
}

/* ---------- CAROUSEL ---------- */
.carousel {
    position: relative;
}

.carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-item {
    position: relative;
    display: none;
    float: left;
    width: 100%;
    margin-right: -100%;
    backface-visibility: hidden;
    transition: transform 0.6s ease-in-out;
}

.carousel-item.active,
.carousel-item-next,
.carousel-item-prev {
    display: block;
}

.carousel-item-next:not(.carousel-item-start),
.active.carousel-item-end {
    transform: translateX(100%);
}

.carousel-item-prev:not(.carousel-item-end),
.active.carousel-item-start {
    transform: translateX(-100%);
}

/* Fade variant */
.carousel-fade .carousel-item {
    opacity: 0;
    transition-property: opacity;
    transform: none;
}

.carousel-fade .carousel-item.active,
.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
    z-index: 1;
    opacity: 1;
}

.carousel-fade .active.carousel-item-start,
.carousel-fade .active.carousel-item-end {
    z-index: 0;
    opacity: 0;
    transition: opacity 0s 0.6s;
}

.carousel-caption {
    position: absolute;
    right: 15%;
    bottom: 1.25rem;
    left: 15%;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
    color: #fff;
    text-align: center;
}

.carousel-control-prev,
.carousel-control-next {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 15%;
    padding: 0;
    color: #fff;
    text-align: center;
    background: none;
    border: 0;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 0.9;
}

.carousel-control-prev {
    left: 0;
}

.carousel-control-next {
    right: 0;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    background-repeat: no-repeat;
    background-position: 50%;
    background-size: 100% 100%;
}

.carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* ---------- NAV TABS ---------- */
.nav {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.nav-link {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
                border-color 0.15s ease-in-out;
    cursor: pointer;
}

.nav-tabs {
    border-bottom: 1px solid #dee2e6;
}

.nav-tabs .nav-link {
    margin-bottom: -1px;
    background: none;
    border: 1px solid transparent;
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
}

.nav-tabs .nav-link.active {
    color: #495057;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
}

.tab-content > .tab-pane {
    display: none;
}

.tab-content > .tab-pane.active {
    display: block;
}

/* Fade support for tabs */
.fade {
    transition: opacity 0.15s linear;
}

.fade:not(.show) {
    opacity: 0;
}

.fade.show {
    opacity: 1;
}

/* ---------- FORMS ---------- */
.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    appearance: none;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #212529;
    background-color: #fff;
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

textarea.form-control {
    min-height: calc(1.5em + 0.75rem + 2px);
}

/* ---------- JUSTIFY-CONTENT-CENTER FOR ROW ---------- */
.justify-content-center { justify-content: center !important; }

/* ---------- SMALL TAG ---------- */
small, .small {
    font-size: 0.875em;
}

/* ---------- ROW JUSTIFY ---------- */
.row.justify-content-center {
    justify-content: center;
}
