/* ==========================================================================
   Responsive & UX enhancement layer
   Loaded last (after style.css / plugins.css / imported-css.css) so it can
   safely patch gaps in the base theme without editing the minified core.
   ========================================================================== */

/* -- 1. Safety net: never allow sideways scrollbars on any screen -------- */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

*, *::before, *::after {
    box-sizing: border-box;
}

img, svg, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

/* -- 2. Bootstrap grid gap-fix --------------------------------------------
   The theme only ships col-lg-* (>=992px) classes on many rows, with no
   col-sm-*/col-md-* companion. Below 992px those columns silently collapse
   to 100% width, so tablets (768-991px) get an all-stacked layout even
   though there is plenty of room for 2+ columns. This restores the same
   column split from 768px up, for any col-lg-N that has no col-sm-*/col-md-*
   class already handling it. Elements that already declare col-sm-*/col-md-*
   are left untouched. -------------------------------------------------- */
@media (min-width: 768px) {
    .col-lg-1:not([class*="col-md-"]):not([class*="col-sm-"]) { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-lg-2:not([class*="col-md-"]):not([class*="col-sm-"]) { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-lg-3:not([class*="col-md-"]):not([class*="col-sm-"]) { flex: 0 0 25%; max-width: 25%; }
    .col-lg-4:not([class*="col-md-"]):not([class*="col-sm-"]) { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-lg-5:not([class*="col-md-"]):not([class*="col-sm-"]) { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-lg-6:not([class*="col-md-"]):not([class*="col-sm-"]) { flex: 0 0 50%; max-width: 50%; }
    .col-lg-7:not([class*="col-md-"]):not([class*="col-sm-"]) { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-lg-8:not([class*="col-md-"]):not([class*="col-sm-"]) { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-lg-9:not([class*="col-md-"]):not([class*="col-sm-"]) { flex: 0 0 75%; max-width: 75%; }
    .col-lg-10:not([class*="col-md-"]):not([class*="col-sm-"]) { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-lg-11:not([class*="col-md-"]):not([class*="col-sm-"]) { flex: 0 0 91.666667%; max-width: 91.666667%; }
}

/* Pricing/plan cards get comfortable breathing room once they're side by
   side instead of full width. */
@media (min-width: 768px) and (max-width: 991.98px) {
    .pricing .card { margin-bottom: 1.5rem; }
}

/* -- 3. Header / navigation ------------------------------------------------ */
#header .header-inner .container {
    flex-wrap: nowrap;
}

#logo {
    display: flex;
    align-items: center;
    min-width: 0;
}

#logo a {
    display: inline-flex;
    align-items: center;
}

#logo img {
    width: auto;
    height: auto;
    max-height: 46px;
    max-width: 44vw;
    object-fit: contain;
}

#mainMenu-trigger {
    display: flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
    justify-content: center;
}

@media (max-width: 1030px) {
    #header .header-inner .container {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    #mainMenu .dropdown-menu li a {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    #mainMenu nav > ul > li > a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

@media (max-width: 480px) {
    #logo img {
        max-height: 36px;
        max-width: 52vw;
    }
}

/* -- 4. Fluid hero / slider typography ------------------------------------ */
.inspiro-slider .slide-captions h1,
.inspiro-slider .slide-captions .slider-header {
    font-size: clamp(1.6rem, 4.5vw + 0.5rem, 3.2rem);
    line-height: 1.2;
}

.inspiro-slider .slide-captions .lead {
    font-size: clamp(0.95rem, 1.2vw + 0.7rem, 1.15rem);
    line-height: 1.6;
    max-width: 100%;
}

.heading-text h2 {
    font-size: clamp(1.4rem, 3vw + 0.5rem, 2.1rem);
    line-height: 1.3;
}

@media (max-width: 767px) {
    .inspiro-slider .slide-captions {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* -- 5. Buttons: comfortable tap targets, sane stacking ------------------- */
.btn, a.btn, button.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 575.98px) {
    .slide-captions [data-caption-animation] .btn,
    .slide-captions .btn {
        width: 100%;
        max-width: 320px;
    }

    .btn + .btn {
        margin-top: 12px;
    }
}

/* -- 6. Tables: scroll instead of squeezing the whole page ---------------- */
.table.is-fullwidth,
table.table {
    width: 100%;
}

@media (max-width: 767.98px) {
    .table.is-fullwidth,
    table.table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
}

/* -- 7. Cards / pricing plans ---------------------------------------------- */
.pricing .card {
    height: 100%;
}

@media (max-width: 767.98px) {
    .pricing .card {
        margin-bottom: 1.75rem;
    }

    .pricing .card:last-child {
        margin-bottom: 0;
    }
}

/* -- 8. Footer -------------------------------------------------------------- */
@media (max-width: 991.98px) {
    footer#footer .footer-col {
        margin-bottom: 2rem;
    }

    footer#footer .row[style] {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 767.98px) {
    footer#footer .copyright-content .text-right {
        text-align: center !important;
        margin-top: 10px;
    }

    footer#footer .copyright-content .social-icons {
        text-align: center;
    }
}

/* -- 9. Section rhythm: scale down generous desktop padding on small screens */
@media (max-width: 767.98px) {
    section {
        padding-left: 0;
        padding-right: 0;
    }

    .container, .container-fluid, .uk-container {
        padding-left: 18px;
        padding-right: 18px;
    }
}

@media (max-width: 480px) {
    .container, .container-fluid, .uk-container {
        padding-left: 14px;
        padding-right: 14px;
    }
}

/* -- 10. Accordion / FAQ tap targets ---------------------------------------- */
.accordion-title,
.accordion .btn-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    text-align: left;
}

/* -- 11. Base readability on small screens ---------------------------------- */
@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
    h2 { font-size: clamp(1.35rem, 5vw, 1.9rem); }
    h3 { font-size: clamp(1.15rem, 4vw, 1.5rem); }
}

/* -- 12. Language switcher: fixed floating widget, bottom-left ------------
   The real Google <select> is kept in the DOM (functionally required to
   trigger translation) but visually hidden off-canvas. A custom button +
   panel, built from that select's own <option> text, gives full control
   over layout/typography instead of relying on the OS's native picker UI
   (which is what produced the inconsistent, oddly-colored dropdown). */
#re-lang-widget {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 9999;
}

#google_translate_element {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

#re-lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1a396b;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
    cursor: pointer;
    min-height: 44px;
}

#re-lang-toggle:hover,
#re-lang-toggle:focus {
    background: #0f2952;
}

#re-lang-caret {
    font-size: 10px;
}

#re-lang-panel {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    width: 220px;
    max-height: 320px;
    overflow-y: auto;
    background: #0e1b33;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
    padding: 0 0 4px;
}

#re-lang-panel[hidden] {
    display: none;
}

.re-lang-panel-title {
    color: #0e1b33;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 16px;
    position: sticky;
    top: 0;
    border-radius: 10px 10px 0 0;
}

.re-lang-item {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: #c9d6f0;
    font-size: 14px;
    font-family: inherit;
    padding: 9px 16px;
    cursor: pointer;
}

.re-lang-item:hover,
.re-lang-item:focus {
    background: rgba(255, 255, 255, .1);
    color: #fff;
    outline: none;
}

@media (max-width: 480px) {
    #re-lang-widget {
        left: 10px;
        bottom: 10px;
    }

    #re-lang-panel {
        width: 200px;
        max-height: 280px;
    }
}
