/**
 * UIKit → Bootstrap 5 Migration Compatibility Layer
 * Maps UIKit 3.16.15 classes to Bootstrap 5.3 equivalents
 * This file will be removed once all content files are migrated (Phase 9)
 */

/* ============================================
   LAYOUT & CONTAINERS
   ============================================ */
.uk-container { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 15px; padding-right: 15px; }
.uk-container-large { max-width: 1400px; }
.uk-container-xlarge { max-width: 1600px; }
.uk-container-small { max-width: 900px; }
.uk-container-expand { max-width: none; }
.uk-section { padding-top: 40px; padding-bottom: 40px; }
.uk-section-muted { background-color: #f8f9fa; }
.uk-panel { position: relative; }
.uk-inline { display: inline-block; position: relative; }

/* ============================================
   FLEXBOX
   ============================================ */
.uk-flex { display: flex !important; }
.uk-flex-center { justify-content: center !important; }
.uk-flex-middle { align-items: center !important; }
.uk-flex-first { order: -1; }
.uk-flex-wrap { flex-wrap: wrap !important; }

/* ============================================
   GRID (uk-grid attribute + classes)
   ============================================ */
[uk-grid], .uk-grid {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
}
[uk-grid] > *, .uk-grid > * {
    padding-left: 15px;
    padding-right: 15px;
    margin-bottom: 30px;
    box-sizing: border-box;
}
.uk-grid-small { margin-left: -7.5px; margin-right: -7.5px; }
.uk-grid-small > * { padding-left: 7.5px; padding-right: 7.5px; margin-bottom: 15px; }
.uk-grid-medium { margin-left: -15px; margin-right: -15px; }
.uk-grid-medium > * { padding-left: 15px; padding-right: 15px; margin-bottom: 30px; }
.uk-grid-large { margin-left: -25px; margin-right: -25px; }
.uk-grid-large > * { padding-left: 25px; padding-right: 25px; margin-bottom: 50px; }
.uk-grid-column-small { margin-left: -7.5px; margin-right: -7.5px; }
.uk-grid-column-small > * { padding-left: 7.5px; padding-right: 7.5px; }
.uk-grid-row-large > * { margin-bottom: 50px; }
.uk-grid-margin { margin-top: 30px; }

/* Child width classes */
.uk-child-width-1-2\@s > * { width: 100%; }
.uk-child-width-1-2\@m > * { width: 100%; }
.uk-child-width-1-3\@s > * { width: 100%; }
.uk-child-width-1-3\@m > * { width: 100%; }
.uk-child-width-expand\@s > * { flex: 1; }

@media (min-width: 640px) {
    .uk-child-width-1-2\@s > * { width: 50%; }
    .uk-child-width-1-3\@s > * { width: 33.333%; }
}
@media (min-width: 960px) {
    .uk-child-width-1-2\@m > * { width: 50%; }
    .uk-child-width-1-3\@m > * { width: 33.333%; }
}

/* Width classes */
.uk-width-1-1\@s { width: 100%; }
.uk-width-1-2 { width: 50%; }
.uk-width-1-2\@s { width: 100%; }
.uk-width-1-2\@m { width: 100%; }
.uk-width-2-5\@m { width: 100%; }
.uk-width-small-1-1 { width: 100%; }
.uk-width-medium-1-2 { width: 100%; }
.uk-width-auto\@m { width: 100%; }

@media (min-width: 640px) {
    .uk-width-1-2\@s { width: 50%; }
}
@media (min-width: 960px) {
    .uk-width-1-2\@m { width: 50%; }
    .uk-width-2-5\@m { width: 40%; }
    .uk-width-medium-1-2 { width: 50%; }
    .uk-width-auto\@m { width: auto; }
}

/* ============================================
   SPACING
   ============================================ */
.uk-margin { margin-top: 20px !important; margin-bottom: 20px !important; }
.uk-margin-top { margin-top: 20px !important; }
.uk-margin-bottom { margin-bottom: 20px !important; }
.uk-margin-large { margin-top: 40px !important; margin-bottom: 40px !important; }
.uk-margin-large-top { margin-top: 40px !important; }
.uk-margin-large-bottom { margin-bottom: 40px !important; }
.uk-margin-medium { margin-top: 25px !important; margin-bottom: 25px !important; }
.uk-margin-medium-top { margin-top: 25px !important; }
.uk-margin-medium-bottom { margin-bottom: 25px !important; }
.uk-margin-small { margin-top: 10px !important; margin-bottom: 10px !important; }
.uk-margin-small-top { margin-top: 10px !important; }
.uk-margin-small-bottom { margin-bottom: 10px !important; }
.uk-margin-small-left { margin-left: 10px !important; }
.uk-margin-xlarge-top { margin-top: 70px !important; }
.uk-margin-remove { margin: 0 !important; }
.uk-margin-remove-adjacent + * { margin-top: 0 !important; }
.uk-padding { padding: 30px !important; }

/* ============================================
   TYPOGRAPHY & TEXT
   ============================================ */
.uk-text { }
.uk-text-center { text-align: center !important; }
.uk-text-left { text-align: left !important; }
.uk-text-right { text-align: right !important; }
.uk-text-justify { text-align: justify !important; }
.uk-text-bold { font-weight: 700 !important; }
.uk-text-italic { font-style: italic !important; }
.uk-text-uppercase { text-transform: uppercase !important; }
.uk-text-large { font-size: 1.5rem; line-height: 1.5; }
.uk-text-lead { font-size: 1.5rem; line-height: 1.5; color: #333; }
.uk-text-small { font-size: 0.875rem; }
.uk-text-meta { font-size: 0.875rem; color: #999; }
.uk-text-primary { color: #1e87f0 !important; }
.uk-text-secondary { color: #6c757d !important; }
.uk-text-muted { color: #999 !important; }
.uk-text-break { word-wrap: break-word; overflow-wrap: break-word; }
.uk-link-text a, a.uk-link-text { color: inherit; }
.uk-link-text a:hover, a.uk-link-text:hover { color: #999; }

/* Headings */
.uk-heading-medium { font-size: 2.5rem; line-height: 1.2; }
.uk-heading-line { overflow: hidden; }
.uk-heading-line > * { display: inline-block; position: relative; }
.uk-heading-line > *::before, .uk-heading-line > *::after {
    content: ""; position: absolute; top: 50%;
    width: 2000px; border-bottom: 1px solid #dee2e6;
}
.uk-heading-line > *::before { right: 100%; margin-right: 0.5em; }
.uk-heading-line > *::after { left: 100%; margin-left: 0.5em; }
.uk-h4 { font-size: 1.25rem; line-height: 1.4; }

/* Articles */
.uk-article { }
.uk-article-title { font-size: 2rem; line-height: 1.2; }
.uk-article-meta { font-size: 0.875rem; color: #999; }

/* ============================================
   BUTTONS
   ============================================ */
.uk-button {
    display: inline-block; padding: 0 30px; line-height: 38px;
    font-size: 0.875rem; text-align: center; text-decoration: none;
    text-transform: uppercase; border: 1px solid transparent;
    border-radius: 0.25rem; cursor: pointer; transition: 0.1s ease-in-out;
}
.uk-button-default { background: transparent; color: #333; border-color: #dee2e6; }
.uk-button-default:hover { background: transparent; color: #333; border-color: #adb5bd; }
.uk-button-primary { background: #1e87f0; color: #fff; border-color: #1e87f0; }
.uk-button-primary:hover { background: #0d6efd; color: #fff; }
.uk-button-secondary { background: #6c757d; color: #fff; border-color: #6c757d; }
.uk-button-secondary:hover { background: #5a6268; color: #fff; }
.uk-button-text { padding: 0; line-height: 1.5; background: none; color: #333; border: none; text-transform: uppercase; }
.uk-button-text:hover { color: #999; }
.uk-button-small { padding: 0 15px; line-height: 28px; font-size: 0.8rem; }
.uk-button-group { display: inline-flex; }
.uk-button-group > .uk-button:not(:last-child) { border-right: none; }
.uk-icon-button {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: #f8f9fa; color: #333; border: none;
}

/* ============================================
   CARDS
   ============================================ */
.uk-card { position: relative; box-sizing: border-box; transition: box-shadow 0.1s ease-in-out; }
.uk-card-default { background: #fff; color: #333; box-shadow: 0 5px 15px rgba(0,0,0,0.08); border: 1px solid #dee2e6; }
.uk-card-body { padding: 30px; }
.uk-card-title { font-size: 1.25rem; line-height: 1.4; }
.uk-card-media-top { overflow: hidden; }
.uk-card-media-top img { width: 100%; display: block; }
.uk-card-hover:hover { box-shadow: 0 14px 25px rgba(0,0,0,0.16); }

/* ============================================
   ALERTS
   ============================================ */
[uk-alert], .uk-alert { padding: 15px 29px 15px 15px; background: #f8f9fa; position: relative; }
.uk-alert-primary { background: #cfe2ff; color: #084298; }
.uk-alert-success { background: #d1e7dd; color: #0f5132; }
.uk-alert-warning { background: #fff3cd; color: #664d03; }
.uk-alert a, [uk-alert] a { color: inherit; text-decoration: underline; }

/* ============================================
   TABLES
   ============================================ */
.uk-table { width: 100%; margin-bottom: 1rem; }
.uk-table th, .uk-table td { padding: 16px 12px; vertical-align: top; border-bottom: 1px solid #dee2e6; }
.uk-table-striped tbody tr:nth-of-type(odd) { background-color: #f8f9fa; }
.uk-table-condensed th, .uk-table-condensed td { padding: 5px 8px; }
.uk-table-hover tbody tr:hover { background-color: rgba(0,0,0,.075); }
.uk-table-responsive { overflow-x: auto; }

/* ============================================
   LISTS
   ============================================ */
.uk-list { list-style: none; padding: 0; }
.uk-list > li { margin-top: 10px; }
.uk-list-striped > li:nth-of-type(odd) { background: #f8f9fa; padding: 5px 10px; }
.uk-list-divider > li:nth-child(n+2) { border-top: 1px solid #dee2e6; padding-top: 10px; }
.uk-list-line > li:nth-child(n+2) { border-top: 1px solid #dee2e6; padding-top: 10px; }

/* ============================================
   VISUAL & STYLING
   ============================================ */
.uk-border-rounded { border-radius: 0.5rem !important; }
.uk-background-cover { background-size: cover !important; background-position: center; }
.uk-background-norepeat { background-repeat: no-repeat !important; }
.uk-background-center-center { background-position: center center !important; }
.uk-background-muted { background-color: #f8f9fa !important; }
.uk-cover-container { position: relative; overflow: hidden; }
[uk-cover], .uk-cover { width: 100%; height: 100%; object-fit: cover; }
.uk-overlay { padding: 30px; }
.uk-overlay-default { background: rgba(255,255,255,0.8); }
.uk-divider-icon { border: none; height: 20px; text-align: center; margin: 20px 0; }
.uk-divider-icon::after { content: "✦"; color: #dee2e6; font-size: 1.2rem; }
.uk-light { color: #fff; }

/* ============================================
   POSITIONING
   ============================================ */
.uk-position-relative { position: relative !important; }
.uk-position-bottom { position: absolute; bottom: 0; left: 0; right: 0; }
.uk-position-center-left { position: absolute; top: 50%; left: 0; transform: translateY(-50%); }
.uk-position-center-right { position: absolute; top: 50%; right: 0; transform: translateY(-50%); }
.uk-position-small { margin: 15px; }
.uk-position-z-index { z-index: 1; }

/* ============================================
   ALIGNMENT
   ============================================ */
.uk-align-left { float: left; margin-right: 30px; margin-bottom: 15px; }
.uk-align-right { float: right; margin-left: 30px; margin-bottom: 15px; }
.uk-align-center { display: block; margin-left: auto; margin-right: auto; }

/* ============================================
   VISIBILITY & RESPONSIVE
   ============================================ */
.uk-visible\@m { display: none !important; }
@media (min-width: 960px) {
    .uk-visible\@m { display: block !important; }
}
.uk-hidden\@m { display: block !important; }
@media (min-width: 960px) {
    .uk-hidden\@m { display: none !important; }
}
.uk-visible-toggle:not(:hover) .uk-hidden-hover { opacity: 0; transition: opacity 0.15s; }
.uk-visible-toggle:hover .uk-hidden-hover { opacity: 1; }
.uk-invisible { visibility: hidden !important; }

/* ============================================
   ANIMATIONS (Scrollspy support)
   ============================================ */
.uk-animation-slide-bottom-small {
    animation: uk-slide-bottom-small 0.5s ease forwards;
}
@keyframes uk-slide-bottom-small {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in {
    visibility: visible !important;
    animation: uk-slide-bottom-small 0.5s ease forwards;
}
.uk-transition-slide-bottom {
    transition: transform 0.3s ease;
}

/* ============================================
   NAVIGATION (for any remaining nav classes in content)
   ============================================ */
.uk-subnav { display: flex; flex-wrap: wrap; list-style: none; padding: 0; gap: 10px; }
.uk-subnav > li > a { color: #999; text-decoration: none; font-size: 0.875rem; text-transform: uppercase; }
.uk-subnav > li.uk-active > a, .uk-subnav > li > a:hover { color: #333; }
.uk-subnav-pill > li > a { padding: 5px 10px; background: #f8f9fa; border-radius: 0.25rem; }
.uk-subnav-pill > li.uk-active > a { background: #1e87f0; color: #fff; }
.uk-breadcrumb { display: flex; flex-wrap: wrap; list-style: none; padding: 0; }
.uk-breadcrumb > li + li::before { content: "/"; margin: 0 10px; color: #999; }
.uk-pagination { display: flex; flex-wrap: wrap; list-style: none; padding: 0; gap: 5px; }

/* ============================================
   ICONS (basic replacement for uk-icon)
   ============================================ */
[uk-icon] { display: inline-block; }
.uk-icon-external-link::after { content: " ↗"; }
.uk-icon-large { font-size: 1.5rem; }

/* ============================================
   FORMS
   ============================================ */
.uk-input, .uk-select, .uk-textarea {
    width: 100%; padding: 0.375rem 0.75rem;
    font-size: 1rem; line-height: 1.5; color: #212529;
    background-color: #fff; border: 1px solid #ced4da; border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out;
}
.uk-input:focus, .uk-select:focus, .uk-textarea:focus {
    border-color: #86b7fe; outline: 0; box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25);
}
.uk-checkbox { width: 1rem; height: 1rem; }
.uk-form-stacked .uk-form-label { display: block; margin-bottom: 5px; }
.uk-form-width-medium { width: 200px; }

/* ============================================
   TABS & ACCORDION
   ============================================ */
[uk-tab] { display: flex; flex-wrap: wrap; list-style: none; padding: 0; border-bottom: 1px solid #dee2e6; }
[uk-tab] > li > a { display: block; padding: 5px 10px; color: #999; text-decoration: none; border-bottom: 2px solid transparent; }
[uk-tab] > li.uk-active > a { color: #333; border-bottom-color: #1e87f0; }
.uk-switcher { list-style: none; padding: 0; margin: 0; }
.uk-switcher > :not(.uk-active) { display: none; }
.uk-accordion-title { cursor: pointer; font-size: 1.25rem; }
.uk-accordion-content { margin-top: 10px; }

/* ============================================
   DOTNAV (slideshow dots)
   ============================================ */
.uk-dotnav { display: flex; flex-wrap: wrap; list-style: none; padding: 0; gap: 10px; }
.uk-dotnav > li > a { display: block; width: 10px; height: 10px; border-radius: 50%; background: rgba(102,102,102,0.4); }
.uk-dotnav > li.uk-active > a { background: #333; }

/* ============================================
   SLIDESHOW (for pre-migration index.php)
   ============================================ */
.uk-slideshow-items { list-style: none; padding: 0; margin: 0; position: relative; overflow: hidden; min-height: 300px; }
.uk-slideshow-items > li { position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow: hidden; }
.uk-slideshow-items > li:first-child { position: relative; }
.uk-slideshow-nav { }

/* ============================================
   MODAL
   ============================================ */
.uk-modal-dialog { position: relative; background: #fff; padding: 30px; border-radius: 0.25rem; max-width: 600px; margin: 50px auto; }
.uk-modal-close { position: absolute; top: 10px; right: 10px; background: none; border: none; font-size: 1.25rem; cursor: pointer; }
