/**
 * Shared storefront base styles for the Mascom Global theme.
 *
 * Only rules that every page of the theme repeats live here (typography and the
 * scrolled state of the shared fixed header). Page templates still push their
 * own <style> block afterwards, so a page-level override keeps winning.
 */

body,
nav,
header,
button,
a {
    font-family: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Scrolled Header Styling: White Background & Black/Dark Text */
#main-header.header-scrolled {
    background-color: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.08) !important;
}

#main-header.header-scrolled nav ul li a {
    color: #1e293b !important;
}

#main-header.header-scrolled nav ul li a:hover {
    color: #dc2626 !important;
}

#main-header.header-scrolled nav button.lg\:hidden {
    color: #0f172a !important;
}

#main-header.header-scrolled #top-bar a,
#main-header.header-scrolled #top-bar span {
    color: #475569 !important;
}

#main-header.header-scrolled #top-bar a:hover {
    color: #dc2626 !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-heading {
    font-family: 'Phudu', cursive, sans-serif;
    font-weight: 600 !important;
}

/*
 * Tailwind Preflight intentionally gives h1--h6 the inherited font size.
 * These classes are added only after an editor picks a heading level, so the
 * original theme typography remains unchanged until that explicit choice.
 */
.client-content-heading-h1,
.client-content-heading-h2,
.client-content-heading-h3,
.client-content-heading-h4,
.client-content-heading-h5,
.client-content-heading-h6 {
    font-family: 'Phudu', cursive, sans-serif !important;
}

.client-content-heading-h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem) !important;
    line-height: 1.05 !important;
    font-weight: 800 !important;
}

.client-content-heading-h2 {
    font-size: clamp(2.125rem, 4vw, 3.5rem) !important;
    line-height: 1.1 !important;
    font-weight: 700 !important;
}

.client-content-heading-h3 {
    font-size: clamp(1.875rem, 3vw, 2.75rem) !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
}

.client-content-heading-h4 {
    font-size: clamp(1.5rem, 2.4vw, 2.25rem) !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
}

.client-content-heading-h5 {
    font-size: clamp(1.25rem, 2vw, 1.75rem) !important;
    line-height: 1.25 !important;
    font-weight: 600 !important;
}

.client-content-heading-h6 {
    font-size: clamp(1.125rem, 1.6vw, 1.35rem) !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
}

/* Prevent Native Video Black Flash */
video {
    background: url('../images/mascom_video_thumb.jpg') center/cover no-repeat !important;
}

/* ---------------------------------------------------------------------------
   GTranslate switcher in the header top bar

   float.js ships a white pill with a shadow, 20px Arial and 33px flags — built
   to float over a page corner, not to sit in a dark contact bar. Everything
   below repaints it as one more top-bar link. The widget writes its rules into
   a <style> tag at runtime, so these need !important to land.
   --------------------------------------------------------------------------- */
.gtranslate_wrapper .gt_float_switcher {
    background: transparent !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    color: #d1d5db !important;
    font-family: 'Gilroy', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 12px !important;
    line-height: 1 !important;
    overflow: visible !important;
    position: relative !important;
}

.gtranslate_wrapper .gt_float_switcher img {
    border-radius: 2px !important;
    height: auto !important;
    margin: 0 6px 0 0 !important;
    width: 18px !important;
}

.gtranslate_wrapper .gt_float_switcher .gt-selected {
    background-color: transparent !important;
    border-radius: 6px !important;
    overflow: visible !important;
    text-transform: none !important;
    transition: background-color .3s ease !important;
}

.gtranslate_wrapper .gt_float_switcher .gt-selected:hover {
    background-color: rgba(255, 255, 255, .08) !important;
}

.gtranslate_wrapper .gt_float_switcher .gt-selected .gt-current-lang {
    align-items: center !important;
    color: #d1d5db !important;
    display: flex !important;
    font-weight: 500 !important;
    gap: 2px !important;
    padding: 5px 8px !important;
    transition: color .3s ease !important;
}

.gtranslate_wrapper .gt_float_switcher .gt-selected:hover .gt-current-lang {
    color: #fff !important;
}

.gtranslate_wrapper .gt_float_switcher .gt-selected .gt-current-lang span.gt-lang-code {
    top: 0 !important;
}

/* The stock arrow is a data URI coloured #666, invisible on a dark bar. */
.gtranslate_wrapper .gt_float_switcher .gt-selected .gt-current-lang span.gt_float_switcher-arrow {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 285 285'><path d='M282 76.5l-14.2-14.3a9 9 0 0 0-13.1 0L142.5 174.4 30.3 62.2a9 9 0 0 0-13.2 0L3 76.5a9 9 0 0 0 0 13.1l133 133a9 9 0 0 0 13.1 0l133-133a9 9 0 0 0 0-13z' style='fill:%23d1d5db'/></svg>") !important;
    background-size: 9px !important;
    height: 14px !important;
    width: 14px !important;
}

/* Inline mode leaves the list in flow, so opening it would stretch the bar.
   The list carries GTranslate's full language set, so it has to stay scrollable
   and capped — never overflow:hidden, which would strand everything past the
   first few entries. */
.gtranslate_wrapper .gt_float_switcher .gt_options {
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, .12) !important;
    border-radius: 10px !important;
    box-shadow: 0 14px 30px rgba(2, 6, 23, .45) !important;
    left: auto !important;
    margin-top: 6px !important;
    max-height: 340px !important;
    min-width: 190px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    position: absolute !important;
    right: 0 !important;
    top: 100% !important;
}

/* The stock scrollbar is a light-grey track, wrong against the dark panel. */
.gtranslate_wrapper .gt_float_switcher .gt_options::-webkit-scrollbar {
    width: 6px !important;
}

.gtranslate_wrapper .gt_float_switcher .gt_options::-webkit-scrollbar-track {
    background-color: transparent !important;
}

.gtranslate_wrapper .gt_float_switcher .gt_options::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, .25) !important;
    border-radius: 999px !important;
}

.gtranslate_wrapper .gt_float_switcher .gt_options a {
    color: #d1d5db !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    padding: 9px 12px !important;
}

.gtranslate_wrapper .gt_float_switcher .gt_options a:hover {
    background: rgba(220, 38, 38, .9) !important;
    color: #fff !important;
}

/* The top bar clips its children so it can animate to max-height:0 on scroll.
   That also clips the open language list, so the clipping is kept only for the
   collapsed state — while the bar is open the list may hang below it. */
#main-header:not(.header-scrolled) #top-bar {
    overflow: visible !important;
}

/* The bar is hidden on small screens; keep the widget from reserving space. */
@media (max-width: 767px) {
    .gtranslate_wrapper {
        display: none;
    }
}
