/* =========================================================
   TVI WORDPRESS — COMPLETE CUSTOM CSS
   Replace all previous Additional CSS with this code.
   ========================================================= */


/* =========================================================
   1. REMOVE THE HEADER SEARCH
   ========================================================= */

#masthead .main-navigation .search-form,
#masthead .search-form,
#masthead .search-field,
#masthead .search-submit {
    display: none !important;
}


/* =========================================================
   2. DESKTOP HEADER
   ========================================================= */

@media only screen and (min-width: 800px) {

    /* Make the header span the full width */
    #masthead {
        width: 100% !important;
        min-height: 120px !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    #masthead > .grid {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #masthead > .grid > .row {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #masthead > .grid > .row > .twelve.column {
        display: flex !important;
        align-items: center !important;

        float: none !important;

        width: 100% !important;
        min-height: 120px !important;

        margin: 0 !important;
        padding: 0 80px !important;

        overflow: visible !important;
    }


    /* =====================================================
       3. DESKTOP LOGO
       Uses the original logo instead of the cropped 96x96
       WordPress thumbnail.
       ===================================================== */

    #masthead .site-branding {
        display: block !important;
        flex: 0 0 230px !important;

        float: none !important;

        width: 230px !important;
        min-width: 230px !important;
        max-width: 230px !important;

        margin: 0 !important;
        padding: 0 !important;

        overflow: visible !important;
    }

    #masthead .site-title {
        display: block !important;
        float: none !important;

        width: 230px !important;
        height: 88px !important;

        margin: 0 !important;
        padding: 0 !important;

        overflow: visible !important;
    }

    #masthead .site-title > a {
        display: block !important;

        width: 230px !important;
        height: 88px !important;
        min-height: 88px !important;

        margin: 0 !important;
        padding: 0 !important;

        background-image: url("https://tvimem.com/wp-content/uploads/2026/08/cropped-TVI-LOGO-PRIMARY-DARK-BACKGROUND.png") !important;
        background-repeat: no-repeat !important;
        background-position: left center !important;
        background-size: contain !important;

        overflow: visible !important;
    }

    /* Hide WordPress's cropped square thumbnail */
    #masthead .site-title > a > span:first-child,
    #masthead .site-title > a img.site-logo {
        display: none !important;
    }

    /* Keep the written site title hidden */
    #masthead .site-title > a > span:last-child {
        display: none !important;
    }

    #masthead .site-description {
        display: none !important;
    }


    /* =====================================================
       4. DESKTOP NAVIGATION POSITION
       ===================================================== */

    #masthead .main-navigation {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        left: auto !important;

        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        flex: 1 1 auto !important;

        float: none !important;

        width: auto !important;
        max-width: none !important;

        margin: 0 0 0 60px !important;
        padding: 0 !important;

        overflow: visible !important;
    }

    #masthead .main-navigation > .menu-primary-container {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;

        width: auto !important;
        max-width: none !important;

        margin: 0 0 0 auto !important;
        padding: 0 !important;

        overflow: visible !important;
    }


    /* Only the top-level navigation */
    #masthead .primary-navigation {
        display: flex !important;
        flex-flow: row nowrap !important;
        align-items: center !important;
        justify-content: flex-end !important;

        width: auto !important;
        max-width: none !important;

        margin: 0 !important;
        padding: 0 !important;

        gap: 36px !important;

        list-style: none !important;
        white-space: nowrap !important;

        overflow: visible !important;
    }

    #masthead .primary-navigation > li {
        position: relative !important;

        display: block !important;
        flex: 0 0 auto !important;

        float: none !important;

        width: auto !important;

        margin: 0 !important;
        padding: 0 !important;

        white-space: nowrap !important;
        overflow: visible !important;
    }

    #masthead .primary-navigation > li > a {
        display: block !important;

        width: auto !important;

        margin: 0 !important;
        padding: 18px 0 !important;

        color: #ffffff !important;

        font-size: 18px !important;
        line-height: 1.25 !important;
        font-weight: 400 !important;

        text-align: left !important;
        text-decoration: none !important;
        white-space: nowrap !important;

        border: 0 !important;
    }

    #masthead .primary-navigation > li > a:hover,
    #masthead .primary-navigation > li > a:focus {
        color: #bed9f2 !important;
        background: transparent !important;
        border: 0 !important;
    }


    /* =====================================================
       5. PRODUCTS DROPDOWN
       ===================================================== */

    #masthead .primary-navigation > li > .sub-menu {
        position: absolute !important;

        top: 100% !important;
        left: -9999px !important;
        right: auto !important;

        z-index: 99999 !important;

        display: block !important;
        float: none !important;

        width: 280px !important;
        min-width: 280px !important;
        max-width: 280px !important;

        margin: 0 !important;
        padding: 10px 0 !important;

        background: #16426e !important;
        border: 0 !important;
        border-radius: 0 !important;

        box-shadow: 0 14px 30px rgba(5, 30, 55, 0.25) !important;

        list-style: none !important;
        white-space: normal !important;
    }

    #masthead .primary-navigation > li:hover > .sub-menu,
    #masthead .primary-navigation > li:focus-within > .sub-menu {
        left: 0 !important;
        right: auto !important;
    }

    #masthead .primary-navigation .sub-menu > li {
        position: relative !important;

        display: block !important;
        float: none !important;

        width: 100% !important;

        margin: 0 !important;
        padding: 0 18px !important;

        text-align: left !important;
        white-space: normal !important;
    }

    #masthead .primary-navigation .sub-menu > li > a {
        display: block !important;

        width: 100% !important;

        margin: 0 !important;
        padding: 11px 0 !important;

        color: #ffffff !important;
        background: transparent !important;

        font-size: 15px !important;
        line-height: 1.4 !important;
        font-weight: 400 !important;

        text-align: left !important;
        text-decoration: none !important;
        white-space: normal !important;

        border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    }

    #masthead .primary-navigation .sub-menu > li:last-child > a {
        border-bottom: 0 !important;
    }

    #masthead .primary-navigation .sub-menu > li > a:hover,
    #masthead .primary-navigation .sub-menu > li > a:focus {
        color: #ffffff !important;
        background: rgba(190, 217, 242, 0.12) !important;
    }
}


/* =========================================================
   6. TABLET HEADER ADJUSTMENTS
   ========================================================= */

@media only screen and (min-width: 800px) and (max-width: 1100px) {

    #masthead > .grid > .row > .twelve.column {
        padding-left: 36px !important;
        padding-right: 36px !important;
    }

    #masthead .site-branding {
        flex-basis: 190px !important;

        width: 190px !important;
        min-width: 190px !important;
        max-width: 190px !important;
    }

    #masthead .site-title,
    #masthead .site-title > a {
        width: 190px !important;
        height: 74px !important;
        min-height: 74px !important;
    }

    #masthead .main-navigation {
        margin-left: 35px !important;
    }

    #masthead .primary-navigation {
        gap: 22px !important;
    }

    #masthead .primary-navigation > li > a {
        font-size: 16px !important;
    }
}


/* =========================================================
   7. MOBILE LOGO
   The theme controls the mobile menu.
   ========================================================= */

@media only screen and (max-width: 799px) {

    #masthead .site-branding {
        width: auto !important;
        max-width: none !important;

        margin: 0 !important;
        padding: 10px 20px !important;

        overflow: visible !important;
    }

    #masthead .site-title {
        display: block !important;

        width: 180px !important;
        height: 68px !important;

        margin: 0 !important;
        padding: 0 !important;
    }

    #masthead .site-title > a {
        display: block !important;

        width: 180px !important;
        height: 68px !important;
        min-height: 68px !important;

        margin: 0 !important;
        padding: 0 !important;

        background-image: url("https://tvimem.com/wp-content/uploads/2026/08/cropped-TVI-LOGO-PRIMARY-DARK-BACKGROUND.png") !important;
        background-repeat: no-repeat !important;
        background-position: left center !important;
        background-size: contain !important;
    }

    #masthead .site-title > a > span:first-child,
    #masthead .site-title > a img.site-logo,
    #masthead .site-title > a > span:last-child {
        display: none !important;
    }

    #masthead .site-description {
        display: none !important;
    }
}




/* =========================================================
   9. PREVENT HORIZONTAL PAGE SCROLL
   ========================================================= */

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

/* Hide the automatically generated title on every page */
body.page #page-header {
  display: none !important;
}

/* =========================================================
   TOP LOGIN LINKS
   ========================================================= */

.site-top-content {
  width: 100% !important;
  padding: 0 !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
}

.site-top-content > .grid,
.site-top-content > .grid > .row {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.site-top-content .twelve.column {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 80px !important;
  box-sizing: border-box !important;
}

.tvi-login-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  width: 100%;
  min-height: 30px;
  text-align: right;
}

.tvi-login-links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: #123457 !important;
  border: 0 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

.tvi-login-links span {
  color: #123457;
  opacity: 0.45;
}

.tvi-login-links a:hover,
.tvi-login-links a:focus {
  color: #2b72b4 !important;
  text-decoration: underline !important;
}

/* Tablet: matches the header's tablet padding */
@media only screen and (min-width: 800px) and (max-width: 1100px) {
  .site-top-content .twelve.column {
    padding-right: 36px !important;
    padding-left: 36px !important;
  }
}

/* Mobile */
@media only screen and (max-width: 799px) {
  .site-top-content .twelve.column {
    padding-right: 20px !important;
    padding-left: 20px !important;
  }

  .tvi-login-links {
    gap: 9px;
    min-height: 36px;
    font-size: 13px;
    white-space: nowrap;
  }

  .tvi-login-links a {
    min-height: 36px;
  }
}