/*
 * rb61_claim — joomla6-compat.css
 * Compatibility patches for Joomla 6.x core HTML output changes.
 * Loaded after all other theme CSS.
 *
 * Key changes from Joomla 3 → 6:
 *  - Bootstrap 5 replaces Bootstrap 3 (col-xs-* → col-*, hidden-xs → d-none d-sm-block, etc.)
 *  - .navbar-default → .navbar
 *  - .navbar-collapse, .collapse.navbar-collapse behaviour
 *  - Module chrome API changed (handled in html/layouts/chromes/)
 */

/* --------------------------------------------------------
   Hero intro image — shown in the carousel area when the
   slideshow module position is empty and the current article
   has an intro image (or fulltext image) set via the
   Article → Images and Links tab in Joomla admin.
   -------------------------------------------------------- */
.hero-intro-image {
    width: 100%;
    overflow: hidden;
    max-height: 460px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-intro-image img {
    width: 100%;
    height: 100%;
    max-height: 460px;
    object-fit: cover;
    object-position: center top;
    display: block;
}
@media (max-width: 767px) {
    .hero-intro-image,
    .hero-intro-image img { max-height: 220px; }
}

/* --------------------------------------------------------
   Bootstrap 3 → Bootstrap 5 bridge
   The template ships its own Bootstrap 3 (bootstrap.min.css)
   so Joomla 6's Bootstrap 5 is NOT loaded for this template.
   These rules guard against any Joomla core output that uses
   Bootstrap 5 classes leaking in via component output.
   -------------------------------------------------------- */

/* Joomla 6 alert / message classes */
.alert-message    { padding: 10px 15px; border-radius: 4px; margin-bottom: 15px; }
.alert-message.alert-success { background: #dff0d8; border: 1px solid #d6e9c6; color: #3c763d; }
.alert-message.alert-warning { background: #fcf8e3; border: 1px solid #faebcc; color: #8a6d3b; }
.alert-message.alert-danger  { background: #f2dede; border: 1px solid #ebccd1; color: #a94442; }
.alert-message.alert-info    { background: #d9edf7; border: 1px solid #bce8f1; color: #31708f; }

/* Joomla 6 system messages */
#system-message-container .alert { padding: 10px 15px; margin-bottom: 10px; border-radius: 4px; }
#system-message-container .alert-success { background:#dff0d8; color:#3c763d; }
#system-message-container .alert-warning { background:#fcf8e3; color:#8a6d3b; }
#system-message-container .alert-danger,
#system-message-container .alert-error   { background:#f2dede; color:#a94442; }
#system-message-container .alert-info    { background:#d9edf7; color:#31708f; }

/* Joomla 6 uses com_content article classes — ensure they inherit body font */
.com-content-article__body,
.com-content-article__intro { font-family: Arial, Helvetica, sans-serif; }

/* Pagination — Joomla 6 outputs .pagination-list */
.pagination-list { list-style: none; padding: 0; display: inline-flex; gap: 4px; }
.pagination-list .page-link { display: inline-block; padding: 4px 10px; color: #D96A00; border: 1px solid #ddd; border-radius: 4px; }
.pagination-list .page-link:hover { background: #D96A00; color: #fff; border-color: #D96A00; }
.pagination-list .active .page-link { background: #D96A00; color: #fff; border-color: #D96A00; font-weight: bold; }
.pagination-list .disabled .page-link { color: #ccc; pointer-events: none; }

/* Search results */
.search-results a { color: #D96A00; }
.search-results dt.result-title { margin-top: 15px; font-weight: 600; }
.search-results dd.result-category,
.search-results dd.result-text { margin-left: 20px; }

/* Breadcrumbs — Joomla 6 */
.breadcrumb-item + .breadcrumb-item::before { content: "›"; padding: 0 8px; color: #fff; }
.breadcrumb-item a { color: #fff; }
.breadcrumb-item.active { color: rgba(255,255,255,.75); }

/* Joomla 6 contact / category list views */
.contact-category .contact-name a { color: #D96A00; }

/* --------------------------------------------------------
   Off-canvas — ensure forMobile display toggle works
   without relying on Bootstrap 3 hidden-xs / visible-xs
   -------------------------------------------------------- */
div.forMobile { display: none; }

@media (max-width: 1199px) {
    div.forMobile { display: block; }
}
@media (min-width: 1200px) {
    div.forMobile { display: none; }
}

/* --------------------------------------------------------
   Navbar toggle fix: Bootstrap 3 .collapsed does not exist
   in Bootstrap 5. Our own bootstrap.min.css handles it but
   Joomla 6 may inject its own navbar markup in some cases.
   -------------------------------------------------------- */
.navbar-toggle { cursor: pointer; }
