/**
 * Header Block Styles - Modern Flexbox Version
 * Bootstrap 5 compatible, no floats, minimal CSS
 */

/* ===================================
   HEADER BASE
   =================================== */

.site-header {
    background: linear-gradient(to bottom, #019de0 0%, #0185c7 100%);
}

.header {
    background: linear-gradient(to bottom, #019de0 0%, #0185c7 100%);
    background-image: url("/wp-content/plugins/spruch-plugin/public/img/header-topbg.png");
    background-repeat: repeat-x;
}

/* ===================================
   LOGO BOX - Flexbox Container
   =================================== */

.logoBox {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.logo img {
    max-height: 107px;
    width: auto;
}

/* Custom logo from WordPress */
.custom-logo-link {
    display: block;
}

.custom-logo {
    max-height: 107px;
    width: auto;
}

/* ===================================
   SEARCH BAR
   =================================== */

.searchbar {
    max-width: 393px;
    display: inline-block;
    padding-top: 45px;
    vertical-align: top;
    text-align: right;
}

/* Social icon links */
.social-icon-link {
    cursor: pointer;
}

.social-icon-link a {
    text-decoration: none;
}

.social-icon-link { 
  /* Add a soft white shadow for depth (optional, based on image style) */
  /* text-shadow: 2px 2px 2px rgba(255, 255, 255, 0.7);  */
  
  /* Make sure links don't have underlines */
  text-decoration: none; 

  /* 1. Apply the gradient as a background image */
  background: linear-gradient(to bottom, #fff, #ddd); /* White to light gray gradient */
  
  /* 2. Clip the background image to the shape of the text/icon */
  -webkit-background-clip: text;
  background-clip: text;
  
  /* 3. Make the actual text (icon) transparent */
  -webkit-text-fill-color: transparent;
  text-fill-color: transparent; /* Standard property, but vendor prefix is necessary for compatibility */

  /* Fallback for very old browsers that don't support clipping */
  color: #fff; 

  /* Optional styling from before */
  font-size: 18px; 
  padding-right: 12px;
  text-decoration: none; 
}


.searchBackBox {
    display: flex;
    align-items: center;
    width: 223px;
    height: 23px;
    position: relative;
    border-radius: 2px;
    background-color: #fff;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.75);
}

.searchinput {
    width: 100%;
    height: 22px;
    padding: 0 30px 0 5px;
    border: none;
    border-radius: 2px;
    background-color: transparent;
    font-size: 12px;
}

.searchinput:focus {
    outline: none;
}

.searchIconbox {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

.searchIcon {
    display: block;
    width: 13px;
    height: 15px;
    padding: 0;
    border: none;
    background: url("/wp-content/plugins/spruch-plugin/public/img/search_background.png") no-repeat center;
    background-size: contain;
    cursor: pointer;
}

/* ===================================
   NAVIGATION BAR
   =================================== */

.headerBottom {
    background: #4ebaff;
    min-height: 37px;
    margin-top: -25px;
}

.navbar {
    padding: 0;
    background: transparent;
    min-height: 37px;
    margin-bottom: 0;
}

.navbar > .container {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
}

/* Main Nav Links */
.nav.navbar-nav.main {
    display: flex;
    flex-wrap: nowrap;
    list-style: none;
    margin: 0 0 0 125px;
    padding: 0;
}

.nav.navbar-nav.main > li > a {
    display: block;
    padding: 0 15px;
    color: #005886;
    text-transform: uppercase;
    text-decoration: none;
    border-right: 1px solid #3989bc;
}

.nav.navbar-nav.main > li:last-child > a {
    border-right: none;
}

.nav.navbar-nav.main > li > a:hover {
    color: #136cb5;
}

/* Core Navigation block compatibility */
.navbar .wp-block-navigation.navbar-nav.main {
    margin: 0 0 0 125px;
}

.navbar .wp-block-navigation.navbar-nav.main .wp-block-navigation__container {
    display: flex;
    flex-wrap: nowrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar .wp-block-navigation.navbar-nav.main .wp-block-navigation-item > a {
    display: block;
    padding: 0 15px;
    color: #005886;
    text-transform: uppercase;
    text-decoration: none;
    border-right: 1px solid #3989bc;
}

.navbar .wp-block-navigation.navbar-nav.main .wp-block-navigation-item:last-child > a {
    border-right: none;
}

.navbar .wp-block-navigation.navbar-nav.main .wp-block-navigation-item > a:hover {
    color: #136cb5;
}

/* ===================================
   NAVBAR TOGGLE (Hamburger Menu)
   Three white bars, no border - matches original
   =================================== */

.navbar-header {
    display: none;
}

.navbar-toggler {
    padding: 0;
    background-color: transparent;
    border: none !important;
    border-radius: 0;
}

.navbar-toggler:focus {
    box-shadow: none !important;
    outline: none;
}

/* Custom icon bars like Bootstrap 3 */
.navbar-toggler .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #fff !important;
    border-radius: 1px;
}

.navbar-toggler .icon-bar + .icon-bar {
    margin-top: 4px;
}

/* ===================================
   SOCIAL ICONS
   =================================== */

.social-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    line-height: 37px;
}

.social-right span {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.social-right img {
    height: 20px;
    width: auto;
}

/* ===================================
   RESPONSIVE: Desktop (>=992px)
   =================================== */

@media (min-width: 992px) {
    .navbar-header {
        display: none;
    }

    /* On desktop, hide search in social-right (it's in logoBox) */
    .social-right .searchbar {
        display: none;
    }
}

/* ===================================
   RESPONSIVE: Tablet (768px - 991px)
   =================================== */

@media (min-width: 768px) and (max-width: 991.98px) {
    /* KEEP margin-top: -25px - DO NOT RESET */

    .nav.navbar-nav.main {
        margin-left: 0;
    }

    /* Hide desktop search */
    .logoBox .searchbar {
        display: none !important;
    }

    /* Show mobile search in social-right */
    .social-right .searchbar {
        display: inline-block;
        padding-top: 3px;
    }
}

/* ===================================
   RESPONSIVE: Mobile (<768px)
   =================================== */

@media (max-width: 767.98px) {
    /* KEEP margin-top: -25px - DO NOT RESET */
    
    /* Hide desktop search */
    .logoBox .searchbar {
        display: none !important;
    }

    .navbar-header {
        display: block;
    }

    .navbar > .container {
        position: relative;
    }

    .navbar-toggler {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
    }

    .navbar-collapse {
        position: absolute;
        top: 37px;
        left: 0;
        right: 0;
        background: #4ebaff;
        z-index: 1000;
        margin-top: 0;
        padding: 0 15px;
    }

    .navbar-collapse:not(.show) {
        display: none;
    }

    /* Mobile nav links - white color, no border */
    .nav.navbar-nav.main {
        flex-direction: column;
        margin: 7.5px -15px;
        width: auto;
    }

    .nav.navbar-nav.main > li > a {
        padding: 10px 15px;
        line-height: 1.5;
        border: none !important;
        border-right: none !important;
        color: #fff !important;
    }

    .nav.navbar-nav.main > li > a:hover,
    .nav.navbar-nav.main > li > a:focus {
        color: #fff !important;
    }

    /* Social icons + search in ONE ROW */
    .social-right {
        display: flex;
        flex-direction: row;
        align-items: center;
        margin: 7.5px -15px;
        padding: 0 15px;
    }

    .social-right .searchbar {
        display: inline-block;
        padding-top: 3px;
        margin-left: 10px;
    }
}
