.main-header-menu .sub-menu li a {
    padding-top: 5px !important;     /* Reduces space above text */
    padding-bottom: 5px !important;  /* Reduces space below text */
    line-height: 1.4 !important;     /* Squeezes the text lines together */
}

/* 3. CLOSE THE GAP BETWEEN MAIN MENU AND SUBMENU */
.main-header-menu .sub-menu {
    top: 85% !important;             /* Tugs the whole box upward toward the menu line */
    padding-top: 0px !important;     /* Removes dead space at the start of the list */
    padding-bottom: 0px !important;  /* Removes dead space at the end of the list */
}
/* FORCE SUBMENU TO TOUCH THE MAIN MENU */
.main-header-menu .sub-menu {
    top: 100% !important; /* Start by resetting to the bottom of the bar */
    margin-top: -15px !important; /* This "tugs" it up. Change to -20px or -25px if needed */
}

/* REMOVE HIDDEN CLEARANCE SPACE */
.ast-desktop .main-header-menu > .menu-item > .sub-menu {
    margin-top: -15px !important; 
}

/* OPTIONAL: Remove the top border if it's creating a visual gap */
.main-header-menu .sub-menu {
    border-top: none !important;
}
/* 1. Force the submenu to ignore theme clearance */
.ast-desktop .main-header-menu .sub-menu, 
.main-header-menu .sub-menu {
    top: 40px !important; /* This forces it to a specific height from the top */
    margin-top: 0 !important;
}

/* 2. Remove the 'hover' bridge that often creates gaps */
.menu-item-has-children:hover > .sub-menu {
    top: 75px !important; /* Adjust this number (e.g., 35px or 50px) to move the box up/down */
}

/* 3. Ensure the main menu items don't have bottom padding pushing the submenu away */
.main-header-menu > .menu-item > a {
    padding-bottom: 0px !important;
    margin-bottom: 0px !important;
}
/* LIFT THE MAIN MENU LINE UPWARD */
.main-navigation, 
.ast-primary-menu-navigation {
    margin-top: -50px !important; /* Increase this to -30px if you want it even higher */
    position: relative !important;
    z-index: 10 !important;
}
/* 1. COLLAPSE THE TOP WHITE SPACE */
.ast-separate-container .site-content {
    padding-top: 0 !important;
}

.ast-separate-container #primary {
    margin-top: 0 !important;
}

/* 2. REMOVE PADDING FROM THE TOP OF THE CONTENT BOX */
.page .entry-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* 3. REMOVE SPACE FROM THE TITLE AREA (IF HIDDEN) */
.ast-header-without-markup .site-content {
    margin-top: 0 !important;
}
/* KEEP THE SUBMENU ATTACHED */
.main-header-menu .sub-menu {
    top: 75px !important; /* Keeping your working 75px setting */
}

@media screen and (max-width: 768px) {
    /* 1. Keep the table 'alive' for the Tab script but allow it to act as a container */
    .wp-block-table table {
        display: block !important;
        width: 100% !important;
    }

    /* 2. Hide the header row only */
    .wp-block-table thead {
        display: none !important;
    }

    /* 3. This forces the table body to stay visible */
    .wp-block-table tbody {
        display: block !important;
        width: 100% !important;
    }

    /* 4. The Magic: Stack the rows into cards */
    .wp-block-table tr {
        display: flex !important;
        flex-direction: column !important;
        margin-bottom: 25px !important;
        padding: 15px !important;
        border: 1px solid #eeeeee !important;
        border-radius: 8px !important;
        background-color: #ffffff !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
    }

    /* 5. Make each cell a full-width line */
    .wp-block-table td {
        display: block !important;
        width: 100% !important;
        padding: 8px 0 !important;
        text-align: left !important;
        border: none !important;
    }

    /* 6. Bold the first item (Sermon Title) */
    .wp-block-table td:first-child {
        font-weight: bold !important;
        font-size: 1.1em !important;
        color: #333 !important;
        border-bottom: 1px solid #f0f0f0 !important;
        margin-bottom: 5px !important;
    }
}