/*! SMSEagle Header v1.0.0 */
:root {
    --se-text:        #364153;
    --se-text-muted:  #4a5565;
    --se-text-sub:    #6b7280;
    --se-accent:      #00b8db;
    --se-accent-dark: #0092b8;
    --se-accent-bg:   #ecfeff;
    --se-divider:     #f3f4f6;
    --se-border:      #e5e7eb;
    --se-header-h:    104px;
    --se-font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============ Sticky wrapper ============ */
.se-header,
.se-header *,
.se-header *::before,
.se-header *::after {
    box-sizing: border-box;
}
.se-header,
.se-header *,
.se-drawer,
.se-drawer * {
    text-transform: none !important;
}
.se-header a, .se-drawer a { text-decoration: none; }
.se-header ul, .se-drawer ul { list-style: none; margin: 0; padding: 0; }

.se-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: #fff;
    font-family: var(--se-font);
    transition: background-color .3s ease, box-shadow .3s ease;
}
body.se-is-scrolled .se-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ============ Top bar ============ */
.se-top-bar {
    background: #fff;
    border-bottom: 1px solid var(--se-divider);
    color: var(--se-text-muted);
}
.se-top-bar__inner {
    /* Both bars share the same page-content rail so their right edges
       line up: top-bar utility cluster ends on the same x as the
       Buy now button below it. Background still spans full viewport. */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    height: 40px;
    padding: 0;
    max-width: 1130px;
    margin: 0 auto;
}
.se-top-bar__contact {
    font-size: 14px;
    line-height: 20px;
    color: var(--se-text-muted);
    text-decoration: none;
    letter-spacing: -0.15px;
    white-space: nowrap;
}
.se-top-bar__contact:hover { color: var(--se-text); }

/* Search compact form */
.se-search {
    display: flex;
    align-items: center;
    gap: 0;
}
.se-search__toggle {
    background: none;
    border: 0;
    padding: 4px;
    cursor: pointer;
    color: var(--se-text-muted);
    line-height: 0;
}
/* No hover state — search toggle keeps its idle color on hover. */
.se-search__toggle:hover,
.se-search__toggle:focus,
.se-search__toggle:focus-visible {
    color: var(--se-text-muted);
    background: transparent !important;
    outline: none;
    box-shadow: none;
}
.se-search__input {
    /* Closed by default. Theme stylesheet sets a default width/padding on
       inputs, so we force these explicitly so the input is invisible
       and untabbable until the magnifier is clicked. */
    width: 0 !important;
    opacity: 0;
    height: 28px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 14px;
    margin: 0 !important;
    font: inherit;
    font-size: 14px;
    background: #fff;
    pointer-events: none;
    transition: width .25s ease, opacity .25s ease, padding .25s ease, border-width .25s ease;
}
.se-search.is-open .se-search__input {
    width: 200px !important;
    opacity: 1;
    padding: 0 12px !important;
    border: 1px solid var(--se-border) !important;
    pointer-events: auto;
}

/* ============ Language switcher (top bar variant) ============ */
.se-lang { position: relative; text-transform: none; }
.se-lang__toggle {
    text-transform: none;
    background: none;
    border: 0;
    padding: 4px 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--se-text-muted);
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.3125px;
}
/* No hover state — language toggle keeps its idle color on hover. */
.se-lang__toggle:hover,
.se-lang__toggle:focus,
.se-lang__toggle:focus-visible {
    color: var(--se-text-muted);
    background: transparent !important;
    outline: none;
    box-shadow: none;
}
.se-lang__flag { width: 16px; height: 12px; object-fit: cover; }
.se-lang__label { white-space: nowrap; }
.se-lang__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--se-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    z-index: 60;
}
.se-lang__menu[hidden] { display: none; }
.se-lang__menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--se-text);
    text-decoration: none;
    font-size: 14px;
}
.se-lang__menu a:hover { background: var(--se-divider); }
.se-lang__menu li[aria-selected="true"] a { background: var(--se-accent-bg); color: var(--se-accent-dark); }

/* ============ Main bar ============ */
.se-main-bar {
    background: #fff;
    border-bottom: 1px solid var(--se-divider);
    color: var(--se-text);
}
.se-main-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 64px;
    padding: 0;
    max-width: 1130px;
    margin: 0 auto;
}
.se-logo { display: inline-flex; align-items: center; text-decoration: none; }
.se-logo img { display: block; height: 40px; width: auto; }

/* ============ Primary nav ============ */
.se-nav { display: flex; }
.se-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}
.se-nav__list > li { position: relative; }
/* Top-level link: mirrors the prototype's `<a class="px-3 py-2 text-[15px]
   text-gray-700 hover:text-gray-900 transition-colors">`. The animated cyan
   underline below the label is the underline span. */
.se-mega__top-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    color: #374151;          /* text-gray-700 */
    font-size: 15px;
    text-decoration: none;
    transition: color .2s ease;
}
.se-mega__top-link:hover,
[data-se-top].is-open .se-mega__top-link {
    color: #111827;          /* text-gray-900 */
}
.se-mega__top-label { position: relative; }
.se-mega__underline {
    position: absolute;
    left: 0;
    /* Sit below the descender line so letters like p/y in "Company"
       don't touch the underline on hover / when the mega is open. */
    bottom: -5px;
    height: 2px;
    width: 0;
    background: var(--se-accent);
    transition: width .3s ease;
}
.se-mega__top-link:hover .se-mega__underline,
[data-se-top].is-open .se-mega__underline { width: 100%; }
.se-mega__chev { width: 16px; height: 16px; transition: transform .2s ease; }
[data-se-top].is-open .se-mega__chev { transform: rotate(180deg); }

/* ============ Mega panel ============ */
.se-mega {
    position: absolute;
    left: 0;
    top: calc(100% + 10px);
    width: max-content;
    min-width: 480px;
    /* Never wider than the page rail (1130px content container). JS keeps the
       panel inside the rail's left/right bounds on open. */
    max-width: min(1130px, calc(100vw - 32px));
    background: #fff;
    border: 1px solid var(--se-border);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0,0,0,.10);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .15s ease, visibility 0s linear .15s, transform .15s ease;
    z-index: 50;
    overflow: hidden;
}
[data-se-top].is-open > .se-mega {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity .15s ease, visibility 0s, transform .15s ease;
}
/* When the featured area is hidden/absent, don't reserve its column width —
   shrink the panel to fit its sections so no empty space is left behind. */
.se-mega:not(:has(.se-mega__featured)) { min-width: 0; }
.se-mega__inner {
    display: flex;
    gap: 24px;
    align-items: stretch;
    padding: 20px;
}
.se-mega__sections {
    display: flex;
    gap: 24px;
    flex: 1 1 auto;
    min-width: 0;
    align-self: flex-start;
}
.se-mega__section { min-width: 160px; }
/* Visible section labels — uppercase eyebrow above the section's links.
   Figma: Inter SemiBold 12/16, letter-spacing 0.3px, color #101828. */
.se-mega__section-title {
    margin: 0 0 12px;
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    color: #101828;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
/* Flat (no-section) lists flow into columns of up to 4 rows — additional links
   create another column. Sections override this below.
   Figma: 8px vertical gap between list items. */
.se-mega__items, .se-mega__sub {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-rows: repeat(4, auto);
    grid-auto-flow: column;
    column-gap: 32px;
    row-gap: 8px;
}
/* Inside a labeled section, links stack vertically without column-wrap. The
   section title already groups them — the 4-row wrap rule does not apply. */
.se-mega__section .se-mega__items {
    display: flex;
    flex-direction: column;
    grid-template-rows: none;
    column-gap: 0;
    row-gap: 8px;
}
/* The outer flat <ul> may be empty when every level-2 item is a section. */
.se-mega__sections > .se-mega__items:empty { display: none; }
.se-mega__leaf-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 6px 8px;
    margin: 0 -8px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
}
.se-mega__leaf-row:hover { background: var(--se-divider); }
.se-mega__leaf-icon { color: var(--se-accent); flex: 0 0 auto; line-height: 0; }
.se-mega__leaf-text { display: flex; flex-direction: column; }
/* Figma: Inter Medium 14/20, letter-spacing -0.1504px, color #101828. */
.se-mega__leaf-label {
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    color: #101828;
    letter-spacing: -0.011em;
    white-space: nowrap;
}
.se-mega__leaf-row:hover .se-mega__leaf-label { color: var(--se-accent-dark); }
/* Figma: Inter Regular 12/16, color #6a7282, 2px gap below the label. */
.se-mega__leaf-desc {
    margin-top: 2px;
    font-size: 12px;
    line-height: 16px;
    font-weight: 400;
    color: #6a7282;
}
/* Constrain leaf text width so descriptions can wrap rather than push the
   section wider. */
.se-mega__section .se-mega__leaf-text { min-width: 0; max-width: 220px; }

/* ============ Featured card ============ */
.se-mega__featured {
    flex: 0 1 240px;
    /* Hard cap, not just flex-basis: during intrinsic (max-content) sizing of
       the panel, Safari ignores the 240px basis and reserves the card's
       *unwrapped* text width (~400px), over-sizing .se-mega and opening a
       phantom gap before the card. max-width caps the intrinsic width too. */
    max-width: 240px;
    min-width: 200px;
    align-self: stretch;
    padding: 20px;
    background: linear-gradient(135deg, #ecfeff 0%, #eff6ff 100%);
    border: 1px solid #cffafe;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}
.se-mega__featured--placeholder {
    background: #f8fafc;
    border-style: dashed;
    border-color: var(--se-border);
    color: var(--se-text-sub);
}
.se-mega__featured--placeholder .se-mega__featured-badge {
    background: #fff;
    color: var(--se-text-sub);
}
.se-mega__featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #fff;
    border-radius: 9999px;
    color: var(--se-accent-dark);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.se-mega__featured-title { margin: 0 0 8px; font-size: 18px; font-weight: 600; color: var(--se-text); }
.se-mega__featured-body  { margin: 0 0 16px; font-size: 14px; color: var(--se-text-sub); line-height: 1.5; }
.se-mega__featured-cta   {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--se-accent-dark);
    text-decoration: none;
}
.se-mega__featured-cta:hover { color: var(--se-accent); }
.se-mega__featured-cta:hover svg { transform: translateX(2px); transition: transform .15s ease; }

/* ============ CTA buttons ============ */
.se-cta { display: flex; align-items: center; gap: 12px; }
.se-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 22px;
    border-radius: 9999px;
    font-family: var(--se-font);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.23px;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}
.se-btn--ghost {
    border: 2px solid var(--se-accent);
    color: var(--se-accent-dark);
    background: #fff;
}
.se-btn--ghost:hover { background: var(--se-accent-bg); color: var(--se-accent-dark); }
.se-btn--primary {
    background: #0BC5FF;
    color: #fff;
    box-shadow: 0 1px 1.5px rgba(0,0,0,.10), 0 1px 1px rgba(0,0,0,.10);
}
.se-btn--primary:hover { background: var(--se-accent-dark); color: #fff; }
.se-btn--block { width: 100%; height: 52px; }
.se-btn--primary.se-btn--block { height: 48px; }

/* ============ Hamburger ============ */
.se-burger {
    display: none;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 8px;
    cursor: pointer;
    color: var(--se-text);
    line-height: 0;
    height: auto;
}
.se-burger:hover, .se-burger:focus { background: transparent !important; color: var(--se-text); }
.se-search__toggle,
.se-lang__toggle,
.se-drawer__row {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
body.se-drawer-open .se-burger__open { display: none; }
body.se-drawer-open .se-burger__close { display: inline-flex; }

/* ============ Drawer ============ */
.se-drawer {
    position: fixed;
    top: var(--se-header-h);
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
    z-index: 40;
    max-height: calc(100vh - var(--se-header-h));
    overflow-y: auto;
}
.se-drawer[hidden] { display: none; }
.se-drawer__inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
    font-family: var(--se-font);
}
.se-drawer__search { position: relative; }
.se-drawer__search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--se-text-sub); pointer-events: none; }
/* [type="search"] bumps specificity above the theme's global
   input[type="search"] rule (theme-styles.css) which would otherwise
   overwrite our padding and slide the placeholder onto the icon. */
.se-drawer__search input[type="search"] {
    width: 100%;
    height: 50px;
    padding: 0 16px 0 40px;
    background: #f9fafb;
    border: 1px solid var(--se-border);
    border-radius: 14px;
    font: inherit;
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: -0.3125px;
    color: var(--se-text);
    box-sizing: border-box;
}
.se-drawer__search input[type="search"]::placeholder { color: rgba(10,10,10,.5); }

.se-drawer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.se-drawer__item { position: relative; }
.se-drawer__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 56px;
    padding: 16px 12px;
    background: none;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    color: #101828;
    letter-spacing: -0.3125px;
    text-align: left;
    transition: background-color .15s ease;
}
.se-drawer__row:hover,
.se-drawer__row:focus-visible { background-color: #f3f4f6; }
.se-drawer__row[data-no-children] .se-drawer__chev { display: none; }
.se-drawer__chev { transition: transform .2s ease; color: var(--se-text); }
.se-drawer__row[aria-expanded="true"] .se-drawer__chev { transform: rotate(180deg); }
.se-drawer__direct { position: absolute; inset: 0; }
.se-drawer__panel { padding: 0 0 8px 16px; }
.se-drawer__panel[hidden] { display: none; }
.se-drawer__sub { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.se-drawer__sub-item a {
    display: block;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--se-text-muted);
    font-size: 15px;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}
.se-drawer__sub-item a:hover,
.se-drawer__sub-item a:focus-visible {
    background-color: #f3f4f6;
    color: var(--se-text);
}
.se-drawer__section { margin-top: 4px; }
.se-drawer__section-title {
    display: block;
    margin: 8px 0 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--se-text-sub);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.se-drawer__cta { display: flex; flex-direction: column; gap: 12px; }
.se-drawer__bottom {
    padding-top: 24px;
    border-top: 1px solid var(--se-divider);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.se-drawer__contact {
    font-size: 16px;
    line-height: 24px;
    color: var(--se-text-muted);
    text-decoration: none;
    letter-spacing: -0.3125px;
}
.se-drawer__contact:hover { color: var(--se-text); }

/* Language switcher in drawer */
.se-lang--drawer .se-lang__toggle { padding: 4px 0; }
.se-lang--drawer .se-lang__menu { position: static; box-shadow: none; border: 0; padding: 8px 0 0; min-width: 0; }
.se-lang--drawer .se-lang__menu a { padding: 8px 0; }

/* Body lock + show state */
body.se-drawer-open { overflow: hidden; }
body.se-drawer-open .se-drawer { display: block; }

/* ============ Responsive ============ */
@media (max-width: 1079px) {
    .se-top-bar__inner { padding: 0 16px; }
    .se-main-bar__inner { padding: 0 16px; }
    .se-nav, .se-cta { display: none; }
    .se-burger { display: inline-flex; }
    .se-mega { display: none; }
}
@media (min-width: 1080px) {
    .se-drawer { display: none !important; }
    .se-burger { display: none !important; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
    .se-header,
    .se-search__input,
    .se-mega,
    .se-mega__underline,
    .se-mega__chev,
    .se-drawer__chev,
    .se-btn,
    .se-mega__featured-cta:hover svg {
        transition: none !important;
    }
}
