/* jomelle — ajustări J6 peste CSS-ul Helix compilat (custom.css) */

/* Bootstrap 5 / Joomla folosesc .visually-hidden; Helix e pe Bootstrap 3 (.sr-only)
   → fără această regulă, label-urile de accesibilitate ("Seleziona la tua lingua",
   "Cerca") rămân vizibile. */
.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;
}

/* Offcanvas: complet inert/ascuns când NU e activ (altfel div-ul fix 350px
   se suprapune peste logo/stânga și prinde click-uri, invizibil). Doar mobil. */
.offcanvas-menu {
    right: -350px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
body.offcanvas .offcanvas-menu {
    right: 0;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
/* Hamburger + megamenu: hamburger doar pe mobil, megamenu doar pe desktop */
#offcanvas-toggler { display: none; }
@media (max-width: 767px) {
    #offcanvas-toggler { display: inline-block; }
    #sp-menu .sp-megamenu-parent { display: none; }
}

/* ===== BS5-compat (migrare de la BS3) ===== */
/* Lățime container ca în originalul BS3 (~1170px) — BS5 merge la 1320px pe xxl */
@media (min-width: 1200px) {
    .container { max-width: 1170px; }
}
/* BS5 .row e flexbox; asigură că .sp-column umple coloana și nu forțează stretch inegal */
.sp-column { width: 100%; }
/* Formular contact: spațiere între câmpuri (BS5 nu are .control-group din BS3) */
.contact-form .control-group,
.contact-form fieldset .field-entry { margin-bottom: 1rem; }
.contact-form .controls input,
.contact-form .controls textarea,
.contact-form input.form-control,
.contact-form textarea.form-control { width: 100%; }
/* BS5: butoanele core (finder) să nu iasă albastre unde template-ul nu le prinde */
#sp-menu .btn-primary, #sp-search .btn-primary { background: var(--accent, #f1501a); border-color: var(--accent, #f1501a); }

/* Buton scroll-up (#sp-scroll-up) — fix jos-dreapta, apare la scroll (.is-visible) */
#sp-scroll-up {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9990;
    width: 44px;
    height: 44px;
    line-height: 44px;
    text-align: center;
    border-radius: 50%;
    background: var(--accent, #f1501a);
    color: #fff;
    font-size: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .3s, transform .3s, visibility .3s, background .3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
#sp-scroll-up:hover {
    color: #fff;
    filter: brightness(0.9);
}
#sp-scroll-up.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#sp-scroll-up i { line-height: inherit; }

/* Meniu offcanvas mobil: submeniurile mereu afișate complet (fără colapsare) */
.offcanvas-menu .mod-menu__sub {
    display: block !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.offcanvas-menu .mod-menu__toggle-sub {
    display: none !important;
}

/* Căutarea (mod_finder) — input centrat vertical ȘI orizontal */
#sp-menu .sp-module,
#sp-search .sp-module {
    display: flex;
    align-items: center;      /* vertical */
    justify-content: center;  /* orizontal */
    height: 100%;
}
#sp-menu .sp-module .sp-module-content,
#sp-search .sp-module .sp-module-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
#sp-menu .mod-finder,
#sp-search .mod-finder {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    width: 100%;
    height: 90px;
}
#sp-menu .mod-finder form,
#sp-search .mod-finder form {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}
#sp-menu .mod-finder .form-control,
#sp-search .mod-finder .form-control {
    margin: 0;
    vertical-align: middle;
}
