/* ==========================================================================
   site.css — header/nav chrome, accessibility and responsive corrections.
   Loaded last so it wins over the vendored theme styles.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */

/* Keyboard users need a way past the header on every page. */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    padding: 12px 20px;
    background: #00366f;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus {
    left: 0;
    outline: 3px solid #ffcc00;
    outline-offset: 2px;
}

/* The theme strips focus rings; put a visible one back for keyboard users
   only, so the mouse experience is unchanged. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #ffcc00;
    outline-offset: 2px;
}

/* Visually hidden but still announced by screen readers. */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    /* WOW.js hides elements until they animate in; with animations off they
       would never appear, so force them visible. */
    .wow {
        visibility: visible !important;
        animation-name: none !important;
    }
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

#header_nav {
    background: #fff;
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 0 90px 0 0;
}

#header_nav .brand-link {
    display: inline-block;
    flex: 0 0 auto;
}

#header_nav .logo {
    margin: 25px;
    width: auto;
    height: auto;
    max-width: 180px;
}

#header_nav .brand-tagline {
    font-size: 13px;
    line-height: 1.4;
    letter-spacing: 0.05em;
    color: #00366f;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Slide-out navigation
   -------------------------------------------------------------------------- */

#sideNav {
    width: 250px;
    height: 100vh;
    height: 100dvh;          /* avoids the mobile browser chrome gap */
    position: fixed;
    right: -250px;
    top: 0;
    background: #00366f;
    z-index: 1002;
    transition: right 0.4s ease;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

#sideNav.is-open {
    right: 0;
}

#sideNav ul {
    margin: 0;
    padding: 0;
}

#sideNav ul li:first-child {
    margin-top: 110px;
}

#sideNav ul li {
    list-style: none;
    margin: 0;
    padding: 0 20px;
}

#sideNav ul li a {
    display: block;
    padding: 14px 0;
    text-decoration: none;
    color: #fff;
    font-size: 17px;
    line-height: 1.3;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    transition: color 0.2s ease;
}

#sideNav ul li a:hover,
#sideNav ul li a:focus {
    color: #ff5b5b;
}

/* Mark where the visitor currently is. */
#sideNav ul li a[aria-current="page"] {
    color: #ffcc00;
    font-weight: 700;
}

/* Dim the page behind the open menu and give a tap target to close it. */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
}
.nav-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Floating widgets step aside while the drawer is open. See the note in
   js/site.js — they live outside .page-wrapper and cannot be layered under the
   nav by z-index alone. */
body.nav-open #google_translate_element,
body.nav-open .scroll-to-top,
body.nav-open .btn-whatsapp-pulse {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

#menuBtn {
    width: 50px;
    height: 50px;
    text-align: center;
    position: fixed;
    right: 30px;
    top: 20px;
    border-radius: 3px;
    z-index: 1003;
    cursor: pointer;
    background-image: url(../images/bgg.png);
    background-size: cover;
    background-color: #00366f;
    border: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#menuBtn img {
    width: 20px;
    height: auto;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Google Translate widget
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   Language selector

   Google injects a bare <select class="goog-te-combo"> plus its own branding.
   Left alone it renders as an unstyled dropdown in a white box that does not
   belong to this design. Everything below restyles that one select into a
   navy pill matching the site palette; the widget's own logo and "Powered by"
   text are hidden, which Google's terms permit as long as the attribution in
   the translated banner is left intact.
   -------------------------------------------------------------------------- */

#google_translate_element {
    position: fixed;
    bottom: 18px;
    left: 18px;
    z-index: 999;
    width: auto;
    line-height: 1;
}

/* Strip Google's own chrome. */
#google_translate_element .goog-logo-link,
#google_translate_element .goog-te-gadget > span,
#google_translate_element img {
    display: none !important;
}

#google_translate_element .goog-te-gadget {
    font-size: 0;
    line-height: 1;
    color: transparent;
    margin: 0;
}

#google_translate_element .goog-te-gadget > div {
    display: inline-block;
}

/* The pill itself. A globe sits on the left and a chevron on the right, both
   inline SVG so there is no extra request and no icon-font dependency. */
#google_translate_element select.goog-te-combo {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    height: 44px;               /* meets the 44px touch-target minimum */
    /* Explicit width: the icon and chevron padding is 76px, so without one the
       control collapses to a few characters of visible label. */
    width: 215px;
    max-width: 70vw;
    margin: 0;
    padding: 0 38px 0 42px;
    text-overflow: ellipsis;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    line-height: 44px;

    background-color: #00366f;
    background-image:
        /* globe, left */
        url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3a15 15 0 0 1 0 18a15 15 0 0 1 0-18'/%3E%3C/svg%3E"),
        /* chevron, right */
        url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: 14px center, right 14px center;
    background-size: 18px 18px, 14px 14px;

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

#google_translate_element select.goog-te-combo:hover {
    background-color: #06498f;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.34);
}

#google_translate_element select.goog-te-combo:focus-visible {
    outline: 3px solid #ffcc00;
    outline-offset: 2px;
}

/* The dropdown list itself is drawn by the OS, so give it readable colours
   rather than inheriting white-on-navy. */
#google_translate_element select.goog-te-combo option {
    background: #ffffff;
    color: #1e2430;
    font-weight: 400;
}

@media screen and (max-width: 575px) {
    #google_translate_element {
        bottom: 14px;
        left: 14px;
    }
    #google_translate_element select.goog-te-combo {
        width: 195px;
        max-width: 62vw;
        font-size: 13px;
        padding: 0 34px 0 38px;
    }
}

/* Google injects a body offset that pushes the fixed header off-screen. */
body {
    top: 0 !important;
}
.skiptranslate iframe {
    display: none !important;
}

/* --------------------------------------------------------------------------
   Component corrections
   -------------------------------------------------------------------------- */

/* Homepage "75+ Years of Legacy" card.
   The intended design overlaps the card across the boundary between the text
   column and the image column — the theme's own .counter-box rule reaches for
   the same effect with margin-right:-80px.
   The original markup did it with width:100%; right:-85%, which put an empty
   full-width wrapper 85% of a column beyond the container and forced a
   horizontal scrollbar at every breakpoint. Same overlap, anchored to the
   right edge with a fixed width, so nothing extends past the container. */
.innovation-section .content-column .inner-column {
    position: relative;
}

/* Kept in normal flow and pushed to the right edge of the text column, then
   pulled 80px into the image column with a negative margin — the same
   technique the theme's own .counter-box rule uses.
   In-flow means it can never land on top of the paragraph, whatever length
   the copy grows to; absolute positioning would need a magic offset that
   breaks the moment the text changes. */
.innovation-section .fact-counter-wrap {
    position: relative;
    z-index: 5;
    width: 300px;
    max-width: 100%;
    margin: 10px -80px 30px auto;
}

.innovation-section .fact-counter-wrap .fact-counter,
.innovation-section .fact-counter-wrap .clearfix {
    width: 100%;
}

.innovation-section .fact-counter-wrap .counter-column {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
    padding: 0;
}

/* Below the two-column breakpoint the columns stack, so there is nothing to
   overlap into — drop the negative margin and left-align the card. */
@media screen and (max-width: 991px) {
    .innovation-section .fact-counter-wrap {
        margin: 30px 0 10px 0;
    }
}

/* Nothing on the page should be able to scroll the document sideways. */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Media should never overflow its column. */
img,
video,
iframe {
    max-width: 100%;
}
img {
    height: auto;
}

.main-slider video {
    display: block;
    width: 100%;
    height: auto;
}

/* Tables of chemical composition are the main content on the product pages
   and were overflowing on phones. */
.table-responsive-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

/* Interactive targets should meet the 44px minimum on touch screens. */
.theme-btn,
.btn,
button,
input[type="submit"],
input[type="button"] {
    min-height: 44px;
}

/* "Contact Details" was an h3 sitting directly under the h1, skipping a level.
   Promoting it to h2 lost the theme's white colour, leaving grey text on the
   red panel at about 2.2:1 — well under the 4.5:1 WCAG AA minimum. */
.contact-page-section .info-column .inner-column .title-box h2 {
    position: relative;
    color: #ffffff;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3em;
}

/* Contact details on the red directors card.
   Turning the plain-text numbers and addresses into tel:/mailto: links made
   them pick up the theme's red link colour — #df1212 on a #df1212 panel, so
   they vanished completely. Anything inside a coloured panel inherits the
   panel's text colour instead. */
.contact-page-section .card .contact-info-list a,
.contact-page-section .info-column .contact-info-list a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-word;
}

.contact-page-section .card .contact-info-list a:hover,
.contact-page-section .card .contact-info-list a:focus,
.contact-page-section .info-column .contact-info-list a:hover,
.contact-page-section .info-column .contact-info-list a:focus {
    color: #ffcc00;
}

/* Long office addresses were running past the edge of their panel. */
.contact-info-list li,
.contact-page-section .info-column .inner-column .title-box {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

/* Form validation feedback */
.form-flash {
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 15px;
}
.form-flash--success {
    background: #e6f4ea;
    color: #14532d;
    border: 1px solid #7cc79a;
}
.form-flash--error {
    background: #fdeaea;
    color: #7f1d1d;
    border: 1px solid #e29393;
}

/* Both floating controls sit over the very bottom of the page. Reserve space in
   the footer so the copyright line is never underneath the translate widget. */
.main-footer .footer-bottom {
    padding-bottom: 70px;
}

@media screen and (max-width: 767px) {
    .main-footer .footer-bottom {
        padding-bottom: 100px;
    }
    .main-footer .footer-bottom .pull-left,
    .main-footer .footer-bottom .pull-right {
        float: none;
    }
    .main-footer .footer-bottom .copyright {
        text-align: center;
    }
}

/* The theme gives this element both .btn-whatsapp-pulse (right:20px) and
   .btn-whatsapp-pulse-border (left:20px). With both set, left wins, so the
   button landed bottom-left on top of the translate widget. Pin it right. */
.btn-whatsapp-pulse,
.btn-whatsapp-pulse-border {
    left: auto !important;
    right: 20px !important;
    bottom: 20px !important;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media screen and (max-width: 991px) {
    #header_nav {
        padding-right: 80px;
    }
    #header_nav .logo {
        margin: 15px 20px;
        max-width: 140px;
    }
    #header_nav .brand-tagline {
        font-size: 11px;
    }
}

@media screen and (max-width: 767px) {
    #menuBtn {
        right: 15px;
        top: 15px;
    }
    #header_nav {
        padding-right: 70px;
    }
    #header_nav .brand-tagline {
        display: none;
    }
    .banner-text h1 {
        font-size: 34px;
    }
    .banner-btn a {
        display: block;
        margin: 20px auto;
    }
    #google_translate_element {
        max-width: 100vw;
    }
    /* Bootstrap 4 keeps .col-sm-* side by side below 576px in some theme
       overrides; force a single column on small phones. */
    .contact-info-list li {
        word-break: break-word;
    }
}

@media screen and (max-width: 575px) {
    #header_nav .logo {
        margin: 12px 15px;
        max-width: 120px;
    }
    .sec-title h2 {
        font-size: 26px;
        line-height: 1.3;
    }
    h1 {
        font-size: 30px;
        line-height: 1.25;
    }
    .page-banner {
        padding: 70px 0;
    }
}
