/* Force all page content to sit tight under the header */
body.page .site-main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}




/* Hide the tag description area if present */
body.tax-jetpack-portfolio-tag .taxonomy-description {
    display: none !important;
}

/* Remove the top spacing left behind */
body.tax-jetpack-portfolio-tag .site-main,
body.tax-jetpack-portfolio-tag .content-area,
body.tax-jetpack-portfolio-tag .entry-content,
body.tax-jetpack-portfolio-tag .hentry {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove margin from the first block on the page */
body.tax-jetpack-portfolio-tag .entry-content > *:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove the empty archive header area on ALL Jetpack Portfolio Tag pages */
body.tax-jetpack-portfolio-tag .page-header,
body.tax-jetpack-portfolio-tag .archive-header,
body.tax-jetpack-portfolio-tag header.page-header {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
/* Hide the CONNECT menu title in the navigation */
nav .menu-title,
nav .menu-name,
nav .menu-heading {
    display: none !important;
}

/* Restore SVG visibility */
.social-navigation .menu-item a svg,
.social-links-menu .menu-item a svg {
    display: inline-block !important;
    width: 1.2em !important;   /* adjust if needed */
    height: 1.2em !important;
    fill: currentColor !important;
}

/* Remove Jetpack/Espied background circle WITHOUT removing the icon */
.social-navigation .menu-item a:before,
.social-links-menu .menu-item a:before {
    background: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Remove padding around the link */
.social-navigation .menu-item a,
.social-links-menu .menu-item a {
    padding: 0 !important;
    background: none !important;
    box-shadow: none !important;
}
.menu-connect-container,
nav.social-navigation,
.social-links-menu {
     !important;
    justify-content: flex-start !important;
}

.social-links-menu li {
    display: inline-block !important;
    margin-right: 10px;
}

}
/* Remove spacing between CONNECT menu item and Instagram icon */
.menu-connect-container li,
nav.social-navigation li {
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove spacing inside the link itself */
.menu-connect-container li a,
nav.social-navigation li a {
    margin: 0 !important;
    padding: 0 !important;
}
/* Remove large space under page titles */
.page .entry-header,
.page .entry-title {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Remove extra spacing before the first block on pages */
.page .entry-content > *:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Re-center images inside portfolio pages */
.single-jetpack-portfolio .entry-content img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.taxonomy-links,
.taxonomy-links * {
    display: none !important;
}

.entry-title {
    display: block !important;
}


/* Force portfolio titles to be visible */
.entry-title,
.jetpack-portfolio .entry-title,
.project-tag .entry-title,
.project-type .entry-title {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Hide ONLY the portfolio-type tag */
.portfolio-type-links {
    display: none !important;
}

/* ----------------------------------------------------------
   FIX: Portfolio grid titles should appear ONLY on hover
   ---------------------------------------------------------- */

/* 1. Hide titles on the portfolio grid by default */
body.post-type-archive-jetpack-portfolio .entry-title,
body.tax-jetpack-portfolio-type .entry-title,
body.tax-jetpack-portfolio-tag .entry-title {
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.25s ease;
}

/* 2. Show titles on hover */
body.post-type-archive-jetpack-portfolio .hentry:hover .entry-title,
body.tax-jetpack-portfolio-type .hentry:hover .entry-title,
body.tax-jetpack-portfolio-tag .hentry:hover .entry-title {
    opacity: 1 !important;
    visibility: visible !important;
}

/* 3. Titles should ALWAYS be visible on single portfolio pages and normal pages */
.single-jetpack-portfolio .entry-title,
.page .entry-title {
    opacity: 1 !important;
    visibility: visible !important;
}

/* 4. Hide ONLY the portfolio-type tag (the "Vessels" etc.) */
.portfolio-type-links {
    display: none !important;
}
/* Set all images inside single portfolio pages to 786px wide */
.single-jetpack-portfolio .entry-content img {
    width: 786px !important;
    max-width: 100% !important; /* prevents overflow on small screens */
    height: auto !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* ----------------------------------------------------------
   MOBILE FIX FOR HOME PAGE TABLE-BASED LAYOUT
   ---------------------------------------------------------- */

@media (max-width: 768px) {

    /* Make table behave like a stacked layout */
    body.home table,
    body.home tbody,
    body.home tr {
        display: block !important;
        width: 100% !important;
    }

    /* Stack the two columns vertically */
    body.home td {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 0 20px 0 !important;
    }

    /* Make images responsive */
    body.home img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* Improve spacing for the text block */
    body.home blockquote {
        padding: 15px !important;
        font-size: 1.1rem !important;
        line-height: 1.4 !important;
    }

    /* Prevent horizontal scrolling */
    body.home {
        overflow-x: hidden !important;
    }
}
