.wp-post-image {
  border-radius: 1rem;
}

.is-layout-constrained > .alignwide {
  width: 90%;
}

.wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) {
  padding: 2rem;
}

#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #1e3a5f;
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.2s ease;
  z-index: 999;
}

/* ===== CARD ===== */
.wp-block-post-template > li > .wp-block-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* ===== IMAGE ===== */
.wp-block-post-featured-image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 20px;
  display: block;
}

/* ===== TITLE ===== */
.wp-block-post-title {
  font-size: 40px !important;
  font-weight: 600;
  line-height: 1.4;
  margin: 4px 0 0 0;
  letter-spacing: -0.01em;
}

.wp-block-post-title a {
  text-decoration: none;
  color: inherit;
}

/* ===== DATE ===== */
.wp-block-post-date {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}

/* ===== EXCERPT ===== */
.wp-block-post-excerpt {
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

/* ===== READ MORE ===== */
.wp-block-read-more,
.wp-block-post-excerpt__more-link {
  display: inline-block;
  margin-top: 6px;
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
}
/* ===== Fix title size on category pages ===== */
.category .wp-block-post-title {
  font-size: 16px !important;
}
/* ===== Fix title size on search pages ===== */
.search .wp-block-post-title {
  font-size: 16px !important;
}
/* ===== PAGINATION ===== */
.wp-block-query-pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
}

.wp-block-query-pagination-numbers a,
.wp-block-query-pagination-previous a,
.wp-block-query-pagination-next a {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: #1e3a5f;
  background: #ffffff;
  transition: 0.2s ease;
}

.wp-block-query-pagination-numbers a:hover,
.wp-block-query-pagination-previous a:hover,
.wp-block-query-pagination-next a:hover {
  background: #1e3a5f;
  color: #ffffff;
  border-color: #1e3a5f;
}

.wp-block-query-pagination-numbers .current {
  padding: 8px 16px;
  border-radius: 10px;
  background: #1e3a5f;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #1e3a5f;
}

.wp-block-query-pagination-next a,
.wp-block-query-pagination-previous a {
  font-weight: 600;
  letter-spacing: 0.01em;
}
/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #1e3a5f;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2563eb;
}
/* ===== PREV/NEXT ===== */
.wp-block-post-navigation-link a {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #1e3a5f !important;
  text-decoration: none !important;
}

.wp-block-post-navigation-link a:hover {
  color: #2563eb !important;
}
css/* ===== FAQ PAGE ===== */

/* Page title */
.page .wp-block-post-title {
  font-size: 36px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin-bottom: 8px !important;
}

/* Intro paragraph */
.page .wp-block-post-content > p:first-child {
  font-size: 15px !important;
  color: #6b7280 !important;
  margin-bottom: 24px !important;
}

/* FAQ accordion items */
.wp-block-details {
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  padding: 16px 20px !important;
  margin-bottom: 10px !important;
  background: #f9fafb !important;
  transition: 0.2s ease !important;
}

.wp-block-details:hover {
  background: #f1f5f9 !important;
  border-color: #d1d5db !important;
}

.wp-block-details summary {
  font-size: 15px !important;
  font-weight: 400 !important;
  font-family: Georgia, serif !important;
  color: #0f172a !important;
  cursor: pointer !important;
  list-style: none !important;
}

.wp-block-details summary::before {
  content: '+ ' !important;
  color: #1e3a5f !important;
  font-weight: 400 !important;
}

.wp-block-details[open] summary::before {
  content: '- ' !important;
}

.wp-block-details p {
  font-size: 14px !important;
  line-height: 1.8 !important;
  color: #374151 !important;
  margin-top: 12px !important;
}

/* Still have questions section */
.page .wp-block-post-content h2 {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin-top: 36px !important;
  padding-bottom: 6px !important;
  border-bottom: 2px solid #e5e7eb !important;
}
/* ===== LATEST POSTS HEADER ===== */
.home .wp-block-query::before {
  content: 'Publications' !important;
  display: block !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
  color: 
#1e3a5f !important;
  border-left: 3px solid 
#1e3a5f !important;
  padding-left: 10px !important;
  margin-bottom: 20px !important;
}
/* ===== FEATURE + 2x2 GRID LAYOUT ===== */

/* 1. Setup the Grid on the Post Template container */
.wp-block-post-template {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* Create 2 columns */
    gap: 30px !important; /* Space between posts */
    list-style: none !important;
    padding: 0 !important;
}

/* 2. Make the FIRST post span both columns (Full Width) */
.wp-block-post-template > li:first-child {
    grid-column: 1 / span 2; 
    margin-bottom: 20px;
}

/* 3. Adjust the first post's featured image to be taller/larger */
.wp-block-post-template > li:first-child .wp-block-post-featured-image img {
    height: 400px; /* Bigger hero image for the latest post */
}

/* 4. Style adjustments for the smaller grid items (2nd post onwards) */
.wp-block-post-template > li:not(:first-child) .wp-block-post-title {
    font-size: 22px !important; /* Smaller titles for the grid items */
}

.wp-block-post-template > li:not(:first-child) .wp-block-post-featured-image img {
    height: 200px; /* Standard height for grid images */
}

/* 5. Mobile Responsiveness: Stack everything in 1 column on small screens */
@media (max-width: 768px) {
    .wp-block-post-template {
        grid-template-columns: 1fr !important;
    }
    
    .wp-block-post-template > li:first-child {
        grid-column: 1 / span 1;
    }
    
    .wp-block-post-template > li:first-child .wp-block-post-featured-image img {
        height: 250px;
    }
}
/* Make the whole social button bigger */
.wp-block-social-links .wp-social-link a {
  padding: 10px 16px !important;
  font-size: 18px !important; /* controls text size */
  display: flex;
  align-items: center;
  gap: 10px;
}
.wp-block-social-link-label {
  font-size: 16px !important;
}
/* Make the icon bigger */
.wp-block-social-links svg {
  width: 30px !important;
  height: 30px !important;
}
/* Mobile Only: Add 'Navigation' label to hamburger */
@media (max-width: 480px) {
    /* 1. Target the button and force it to show items side-by-side */
    .wp-block-navigation__responsive-container-open {
        display: inline-flex !important;
        align-items: center !important;
        gap: 40px !important;
        background: none !important;
        border: none !important;
    }

    /* 2. Inject the text label */
    .wp-block-navigation__responsive-container-open::after {
        content: "Navigation" !important;
        font-family: inherit !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        color: #1e3a5f !important; /* Matches your brand blue */
        letter-spacing: 0.08em !important;
    }
}
@media screen and (min-width: 1024px) {
    /* The Sticky Bar */
    .menu-is-stuck {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 99999 !important;
        display: flex !important;
        justify-content: center !important; /* This is the true center */
        align-items: center !important;
        background-color: #e0e7ff !important;
        padding: 12px 0 !important;
        transition: all 0.4s ease-in-out;
    }

    /* Admin Bar adjustment */
    .admin-bar .menu-is-stuck { top: 32px !important; }

    /* Float away effect */
    .menu-is-stuck.nav-hidden {
        opacity: 0 !important;
        transform: translateY(-100%);
        pointer-events: none !important;
    }

    /* Floating X Button - doesn't affect centering */
    #nav-toggle-btns {
        position: absolute !important;
        right: 25px !important;
    }

    #hide-nav {
        background: #001f3f !important; /* Navy */
        color: white !important;
        border: none !important;
        border-radius: 4px !important;
        width: 32px;
        height: 32px;
        cursor: pointer;
        font-size: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    /* Force the navigation container to ignore everything and stay centered */
    .menu-is-stuck .wp-block-navigation__container {
        margin: 0 auto !important;
        padding: 0 !important;
        display: flex !important;
        justify-content: center !important;
        gap: 35px !important;
        max-width: none !important;
    }
}
/* ===== THE FINAL "FIX EVERYTHING" RESET ===== */

/* 1. Desktop: 4 columns, consistent spacing */
.search .wp-block-post-template,
.category .wp-block-post-template {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 30px 20px !important;
    align-items: start !important;
}

/* 2. Kill the "Hero" stretch on the first item */
.search .wp-block-post-template > li:first-child,
.category .wp-block-post-template > li:first-child {
    grid-column: span 1 !important;
    margin: 0 !important;
}

/* 3. Image Fix: Normal aspect ratio, no stretching */
.search .wp-block-post-featured-image img,
.category .wp-block-post-featured-image img {
    width: 100% !important;
    height: 180px !important; /* Fixed height for symmetry */
    object-fit: cover !important;
    border-radius: 12px !important;
    display: block !important;
}

/* 4. Title Fix: Large enough to read, bold, and normal */
.search .wp-block-post-title,
.category .wp-block-post-title,
.search .wp-block-post-template > li:first-child .wp-block-post-title,
.category .wp-block-post-template > li:first-child .wp-block-post-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin: 12px 0 0 0 !important;
    display: block !important;
    text-transform: none !important;
}

/* ===== RESPONSIVE (IPAD & MOBILE) ===== */

/* iPad/Tablet: 2 per row so it's not squished */
@media (max-width: 1024px) {
    .search .wp-block-post-template,
    .category .wp-block-post-template {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Mobile: 1 per row for a clean stack */
@media (max-width: 600px) {
    .search .wp-block-post-template,
    .category .wp-block-post-template {
        grid-template-columns: 1fr !important;
    }
    
    .search .wp-block-post-featured-image img,
    .category .wp-block-post-featured-image img {
        height: 220px !important; /* Slightly taller for better mobile look */
    }
}
/* Hide the script-generated X button on mobile/tablets */
@media (max-width: 1023px) {
    #nav-toggle-btns {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}
/* Ensure all titles are identical on Tablets and Phones */
@media (max-width: 1024px) {
    .wp-block-post-template > li:first-child .wp-block-post-title,
    .wp-block-post-template > li .wp-block-post-title {
        font-size: 24px !important; /* Matches your standard mobile title size */
        margin-top: 10px !important;
    }
}

/* Specific fix for smaller phones */
@media (max-width: 480px) {
    .wp-block-post-template > li:first-child .wp-block-post-title,
    .wp-block-post-template > li .wp-block-post-title {
        font-size: 22px !important;
        line-height: 1.2 !important;
    }
}
