/* Magereza SACCO – additions for the Joomla 6 rebuild (keeps the original look) */

/* <base> tag in use: keep images responsive inside articles */
.item-page img, .blog img { max-width: 100%; height: auto; }

/* ---------- Hero slider (replaces Revolution Slider) ---------- */
.mag-slider { position: relative; width: 100%; max-height: 400px; overflow: hidden; background: #e9e9e9; }
.mag-slider .mag-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s; }
.mag-slider .mag-slide.active { opacity: 1; visibility: visible; z-index: 2; }
.mag-slider .mag-slide > img.mag-bg { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.mag-slider .tp-caption { position: absolute; opacity: 0; white-space: nowrap; transform: translateX(120px) scale(var(--k, 1)); transition: opacity .8s ease, transform .8s ease; z-index: 5; }
.mag-slider .mag-slide.active .tp-caption { opacity: 1; transform: translateX(0) scale(var(--k, 1)); }
.mag-slider .tp-caption.sfl { transform: translateX(-120px) scale(var(--k, 1)); }
.mag-slider .mag-slide.active .tp-caption.sfl { transform: translateX(0) scale(var(--k, 1)); }
.mag-slider .tp-caption a.tp-button { pointer-events: auto; }
.mag-slider-arrow { position: absolute; top: 50%; margin-top: -20px; width: 40px; height: 40px; z-index: 10; background: rgba(0,0,0,.35); color: #fff; text-align: center; line-height: 40px; opacity: 0; transition: opacity .3s; text-decoration: none; }
.mag-slider-arrow.mag-prev { left: 20px; }
.mag-slider-arrow.mag-next { right: 20px; }
.mag-slider-arrow:before { font-family: FontAwesome; font-size: 22px; }
.mag-slider-arrow.mag-prev:before { content: "\f104"; }
.mag-slider-arrow.mag-next:before { content: "\f105"; }
.mag-slider:hover .mag-slider-arrow { opacity: 1; }
.mag-slider-arrow:hover { background: rgba(0,0,0,.6); color: #fff; }
.mag-slider-dots { position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; z-index: 10; }
.mag-slider-dots button { width: 12px; height: 12px; margin: 0 4px; padding: 0; border: 2px solid #fff; background: transparent; border-radius: 0; cursor: pointer; }
.mag-slider-dots button.active { background: #fff; }
.mag-slider:not(.ready) { height: 400px; }

/* ---------- Header: sticky holder & mega menu ---------- */
.sp-megamenu-parent > li.touch-open > .sp-dropdown { display: block; opacity: 1; visibility: visible; }

/* ---------- Off-canvas mobile menu ---------- */
.offcanvas-menu .mag-mobile-menu, .offcanvas-menu .mag-mobile-sub { list-style: none; margin: 0; padding: 0; }
.offcanvas-menu .mag-mobile-menu > li { position: relative; border-bottom: 1px solid rgba(255,255,255,.12); }
.offcanvas-menu .mag-mobile-menu li > a { display: block; padding: 12px 50px 12px 15px; color: #eee; }
.offcanvas-menu .mag-mobile-menu li.active > a, .offcanvas-menu .mag-mobile-menu li > a:hover { color: #fff; }
.offcanvas-menu .mag-sub-toggle { position: absolute; top: 0; right: 0; width: 46px; height: 44px; background: transparent; border: 0; color: #fff; font-size: 20px; cursor: pointer; }
.offcanvas-menu .mag-mobile-sub { display: none; background: rgba(0,0,0,.18); }
.offcanvas-menu li.open > .mag-mobile-sub { display: block; }
.offcanvas-menu .mag-mobile-sub li a { padding-left: 30px; }

/* ---------- Downloads lists (replaces Phoca Download) ---------- */
.mag-downloads { list-style: none; margin: 0 0 20px; padding: 0; }
.mag-downloads li { padding: 8px 0 8px 28px; border-bottom: 1px solid #eee; position: relative; }
.mag-downloads li:before { content: "\f1c1"; font-family: FontAwesome; position: absolute; left: 4px; top: 8px; color: #2bb673; }
.mag-downloads li a { font-weight: bold; }
.mag-downloads .mag-file-meta { color: #888; font-size: 12px; margin-left: 8px; }

/* ---------- Contact form ---------- */
.contact-form-wrap label { font-weight: bold; }
.contact-form-wrap .form-control, .contact-form-wrap input[type=text], .contact-form-wrap input[type=email], .contact-form-wrap textarea { width: 100%; padding: 8px 10px; border: 1px solid #ccc; }

/* ---------- Responsive helpers ---------- */
@media (max-width: 767px) {
    .mag-slider { max-height: none; }
    .mag-slider .tp-caption { font-size: 90%; }
    #sp-left { margin-bottom: 30px; }
    table { max-width: 100%; }
    .item-page table, .blog table { display: block; overflow-x: auto; }
}

/* ---------- Off-canvas panel (was provided by jf_mobilemenu in the original) ---------- */
.offcanvas-menu { width: 280px; height: 100%; background: #4a5052; color: #eee; position: fixed; top: 0; right: -290px; z-index: 9999; overflow-y: auto; visibility: hidden; transition: right .35s ease, visibility .35s; }
body.offcanvas .offcanvas-menu { right: 0; visibility: visible; opacity: 1; }
.offcanvas-menu .offcanvas-inner { padding: 50px 0 20px; }
.offcanvas-menu .offcanvas-inner .sp-module { background: transparent; border: 0; padding: 0; margin: 0; }
.offcanvas-menu .close-offcanvas { position: absolute; top: 10px; right: 15px; z-index: 2; color: #fff; }

/* FAQ accordion (native <details>, replaces the FSF module) */
.mag-faq { border-bottom: 1px solid #ddd; padding: 10px 0; }
.mag-faq summary { cursor: pointer; font-size: 120%; font-weight: bold; }
.mag-faq .mag-faq-answer { padding: 10px 0 0 15px; }

.contact-misc a { color: #fff; text-decoration: underline; }

@media (min-width: 768px) { #offcanvas-toggler { display: none !important; } }
.article-info-term { display: none; }



/* =========================================
   Joomla Contact Form - Send an Email
   Scoped styling - will not affect other forms
========================================= */

fieldset:has(#jform_contact_name) {
    max-width: 750px;
    margin: 15px auto;
    padding: 20px 25px;
    background: #ffffff;
    border: 1px solid #e5eaf0;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}

/* Form heading */
fieldset:has(#jform_contact_name) legend {
    float: none;
    width: auto;
    padding: 0 12px;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
    color: #183b56;
    border-bottom: none;
}

/* Required field notice */
fieldset:has(#jform_contact_name) .field-spacer {
    margin-bottom: 20px;
    font-size: 13px;
    color: #777;
}

fieldset:has(#jform_contact_name) .red,
fieldset:has(#jform_contact_name) .star {
    color: #dc3545;
}

/* Form field groups */
fieldset:has(#jform_contact_name) .control-group {
    margin-bottom: 10px;
}

/* Labels */
fieldset:has(#jform_contact_name) .control-label {
    float: none;
    width: 100%;
    margin-bottom: 8px;
    text-align: left;
}

fieldset:has(#jform_contact_name) .control-label label {
    font-size: 14px;
    font-weight: 600;
    color: #34495e;
}

/* Input containers */
fieldset:has(#jform_contact_name) .controls {
    margin-left: 0;
}

/* Input fields and textarea */
fieldset:has(#jform_contact_name) input.form-control,
fieldset:has(#jform_contact_name) textarea.form-control {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    font-size: 14px;
    color: #333;
    background: #f8fafc;
    border: 1px solid #dce3eb;
    border-radius: 7px;
    outline: none;
    box-shadow: none;
    transition: all 0.25s ease;
}

/* Input height */
fieldset:has(#jform_contact_name) input.form-control {
    height: 36px;
}

/* Message textarea */
fieldset:has(#jform_contact_name) textarea.form-control {
    min-height: 160px;
    resize: vertical;
}

/* Focus effect */
fieldset:has(#jform_contact_name) input.form-control:focus,
fieldset:has(#jform_contact_name) textarea.form-control:focus {
    background: #ffffff;
    border-color: #2475a8;
    box-shadow: 0 0 0 3px rgba(36, 117, 168, 0.12);
}

/* Placeholder styling */
fieldset:has(#jform_contact_name) input::placeholder,
fieldset:has(#jform_contact_name) textarea::placeholder {
    color: #9aa6b2;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    fieldset:has(#jform_contact_name) {
        margin: 15px 10px;
        padding: 22px 18px;
    }

    fieldset:has(#jform_contact_name) legend {
        font-size: 21px;
    }

    fieldset:has(#jform_contact_name) input.form-control,
    fieldset:has(#jform_contact_name) textarea.form-control {
        font-size: 14px;
    }
}

