/* Uniform featured images on article listings */
body:not(.single) .post-thumbnail img {
    width: 100%;
    aspect-ratio: 3 / 2;
    height: auto;
    object-fit: cover;
    object-position: center;
    display: block;
}
/* Desktop header logo size */
.site-header .custom-logo {
    width: 260px;
    max-width: 100%;
    height: auto;
}

/* Mobile header logo size */
@media screen and (max-width: 767px) {
    .site-header .custom-logo {
        width: 180px;
        height: auto;
    }
}
/* Reduce header vertical spacing */
.site-header {
    padding-top: 15px;
    padding-bottom: 15px;
}
/* Reduce homepage content spacing */
.home .site-content {
    padding-top: 20px;
}

.home .entry-content {
    margin-top: 0;
}

/* =================================
   MOBILE WEBSITE OPTIMIZATION
   ================================= */

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

    /* Header spacing */
    .site-header {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    /* Logo size */
    .site-header .custom-logo {
        width: 180px;
        max-width: 100%;
        height: auto;
    }

    /* Space below header */
    .home .site-content {
        padding-top: 10px;
    }

    .home .entry-content {
        margin-top: 0;
    }

    /* Welcome heading */
    .home .entry-content h1 {
        font-size: 26px !important;
        line-height: 1.2;
        margin-top: 16px;
        margin-bottom: 20px;
    }

    /* Section headings */
    .home .entry-content h2 {
        font-size: 23px !important;
        line-height: 1.3;
        margin-top: 24px;
        margin-bottom: 16px;
    }

    /* Homepage paragraphs */
    .home .entry-content p {
        font-size: 16px !important;
        line-height: 1.6;
        margin-top: 12px;
        margin-bottom: 16px;
    }

    /* Navigation */
    .site-header .main-navigation a {
        font-size: 14px;
    }

    /* Reduce excessive spacer heights */
    .home .wp-block-spacer {
        max-height: 24px;
    }
}
/* Mobile header alignment */
@media screen and (max-width: 767px) {

    .site-header {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }

    .site-header .site-branding {
        width: auto !important;
        max-width: 65%;
        margin: 0 !important;
        padding: 0;
    }

    .site-header .custom-logo {
        width: 160px;
        height: auto;
    }

    .site-header .main-navigation {
        width: auto;
        margin: 0 !important;
    }

    .site-header .menu-toggle {
        margin: 0 !important;
    }
}
/* Tablet header optimization */
@media screen and (min-width: 600px) and (max-width: 1024px) {

    .site-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 20px 15px;
        gap: 20px;
    }

    .site-header .site-branding {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        text-align: center !important;
    }

    .site-header .custom-logo-link {
        display: inline-block;
        margin: 0 auto;
    }

    .site-header .custom-logo {
        width: 220px !important;
        height: auto;
    }

    .site-header .main-navigation {
        width: 100% !important;
        margin: 0 auto !important;
        text-align: center;
    }

    .site-header .main-navigation ul {
        justify-content: center !important;
    }
}
 
/* =================================
   MOBILE & TABLET TAP ACCESSIBILITY
   ================================= */

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

    /* Buttons and form controls */
    button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    .wp-block-button__link,
    .wp-element-button {
        min-height: 44px;
        min-width: 44px;
        box-sizing: border-box;
    }

    /* Mobile menu button */
    .site-header .menu-toggle {
        min-height: 44px;
        min-width: 44px;
        padding: 10px 14px;
    }

    /* Navigation links */
    .main-navigation a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 8px 6px;
        box-sizing: border-box;
    }

    /* Social media icons */
    .wp-block-social-links {
        gap: 8px;
    }

    .wp-block-social-links .wp-social-link a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        box-sizing: border-box;
    }

    /* Read more and load more links */
    .more-link,
    .read-more,
    .wp-block-post-excerpt__more-link {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 8px 4px;
        box-sizing: border-box;
    }

    /* Pagination links */
    .page-numbers:not(.dots),
    .wp-block-query-pagination a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        min-width: 44px;
        box-sizing: border-box;
    }

    /* Contact and search form fields */
    input[type="text"],
    input[type="email"],
    input[type="search"],
    input[type="tel"],
    input[type="url"],
    select {
        min-height: 44px;
        font-size: 16px;
        box-sizing: border-box;
    }
}

/* =================================
   SITEWIDE HEADER CONSISTENCY
   ================================= */

/* All pages - base header styling */

.site-header {
    padding-top: 15px;
    padding-bottom: 15px;
}

.site-header .custom-logo {
    width: 260px !important;
    max-width: 100%;
    height: auto;
}

.site-header .site-branding {
    margin-top: 0;
    margin-bottom: 0;
}


/* =================================
   DESKTOP HEADER
   ================================= */

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

    .site-header {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 20px;
    }

    .site-header .site-branding {
        width: auto !important;
        margin: 0 !important;
        text-align: left;
    }

    .site-header .main-navigation {
        width: auto;
        margin: 0 !important;
    }

    .site-header .main-navigation a {
        font-size: 15px;
    }
}


/* =================================
   TABLET HEADER
   ================================= */

@media screen and (min-width: 600px) and (max-width: 1024px) {

    .site-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center;
        gap: 16px;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .site-header .site-branding {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        text-align: center !important;
    }

    .site-header .custom-logo-link {
        display: inline-block;
        margin: 0 auto;
    }

    .site-header .custom-logo {
        width: 220px !important;
        height: auto;
    }

    .site-header .main-navigation {
        width: 100% !important;
        margin: 0 auto !important;
        text-align: center;
    }

    .site-header .main-navigation ul {
        justify-content: center;
    }
}


/* =================================
   MOBILE HEADER
   ================================= */

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

    .site-header {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding-top: 10px;
        padding-bottom: 10px;
        gap: 12px;
    }

    .site-header .site-branding {
        width: auto !important;
        max-width: 65%;
        margin: 0 !important;
        padding: 0;
        text-align: left;
    }

    .site-header .custom-logo {
        width: 160px !important;
        height: auto;
    }

    .site-header .main-navigation {
        width: auto;
        margin: 0 !important;
    }

    .site-header .menu-toggle {
        margin: 0 !important;
        min-height: 44px;
        min-width: 44px;
    }

    .site-header .main-navigation a {
        font-size: 14px;
    }
}