/*
 Theme Name: Astra Child
 Theme URI: https://wpastra.com/
 Description: Astra Child Theme with Shrinking Sticky Header
 Author: Muhammad Laraib
 Template: astra
 Version: 1.0.5
*/

/* ============================================
   REMOVE ALL BORDERS - FORCEFUL
   ============================================ */

/* Normal state borders */
#masthead,
.site-header,
.ast-primary-header,
.ast-header-break-point #masthead,
.ast-header-break-point .site-header,
.main-header-bar,
.ast-header-sticked #masthead,
.site-branding,
.main-navigation {
    border: none !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
}

/* Remove Astra's pseudo elements that create lines */
#masthead:before,
#masthead:after,
.main-header-bar:before,
.main-header-bar:after,
.ast-primary-header:before,
.ast-primary-header:after {
    display: none !important;
    content: none !important;
}

/* ============================================
   STICKY HEADER
   ============================================ */

#masthead.ast-sticky,
.site-header.ast-sticky {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 999999 !important;
    background: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
}

/* Sticky state - remove all borders */
.ast-sticky,
.ast-sticky #masthead,
.ast-sticky .main-header-bar,
.ast-sticky .site-branding {
    border: none !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
}

/* ============================================
   FIX WHITE LINES BETWEEN TOP BAR & MAIN HEADER
   ============================================ */

/* Remove gap/margin/border between above-header and main-header */
.ast-sticky .ast-above-header-bar,
.ast-sticky .ast-below-header-bar,
.ast-sticky .ast-primary-header-bar,
#masthead.ast-sticky .ast-above-header-bar,
#masthead.ast-sticky .main-header-bar {
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    outline: none !important;
}

/* Remove pseudo-elements from above-header that create thin lines */
.ast-sticky .ast-above-header-bar:before,
.ast-sticky .ast-above-header-bar:after,
.ast-sticky .ast-primary-header-bar:before,
.ast-sticky .ast-primary-header-bar:after {
    display: none !important;
    content: none !important;
}

/* ============================================
   SHRINKING
   ============================================ */

/* Shrink header when sticky */
.ast-sticky .main-header-bar {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.ast-sticky .site-logo-img img {
    max-height: 40px !important;
}

/* ============================================
   BODY PADDING - ONLY WHEN STICKY
   ============================================ */

/* Default: NO padding at top */
body {
    padding-top: 0 !important;
}

/* Only add padding when header IS sticky */
body.header-is-sticky {
    padding-top: 60px !important;
}

/* Admin bar */
body.admin-bar.header-is-sticky #masthead.ast-sticky {
    top: 32px !important;
}

@media (max-width: 782px) {
    body.admin-bar.header-is-sticky #masthead.ast-sticky {
        top: 46px !important;
    }
}

/* ============================================
   TRANSITIONS
   ============================================ */

#masthead,
.main-header-bar,
.site-logo-img img {
    transition: all 0.3s ease !important;
}
