/*
Theme Name: Erick Beaulieu - Astra Child
Theme URI: https://erickbeaulieu.co/
Description: Custom Astra child theme for Erick Beaulieu.
Author: Tekuno
Template: astra
Version: 1.0.0
Text Domain: erick-astra-child
*/

/* ==========================================================
   ERICK BEAULIEU - CUSTOM STYLES
   ========================================================== */

/* ==========================================================
   MIGRATED CSS FROM ASTRA CUSTOMIZER
   Original source: Additional CSS
   ========================================================== */


/* ==================================================
   Erick Beaulieu - Astra Desktop Navigation
   Replaces TheFox interior page navigation
   ================================================== */

@media (min-width: 922px) {

  /* Header background */
  #ast-desktop-header .ast-primary-header-bar {
    background-color: #404b56;
  }

  /* 1170px centered navigation container */
  #ast-desktop-header .site-primary-header-wrap {
    width: 100%;
    max-width: 1170px;
    padding-inline: 0;
    margin-inline: auto;
  }

  /* Expand the Astra builder structure */
  #ast-desktop-header .ast-builder-grid-row {
    width: 100%;
    column-gap: 0;
  }

  #ast-desktop-header .site-header-primary-section-center {
    width: 100%;
    flex: 1 1 100%;
  }

  /* Fix the inner containers that restricted width */
  #ast-desktop-header .ast-builder-menu-1,
  #ast-desktop-header .ast-main-header-bar-alignment,
  #ast-desktop-header .main-header-bar-navigation,
  #ast-desktop-header .site-navigation,
  #ast-desktop-header .main-navigation,
  #ast-desktop-header .main-header-menu {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  #ast-desktop-header .ast-builder-menu-1 {
    flex: 1 1 100%;
  }

  /* Five equal-width menu items */
  #ast-desktop-header .main-header-menu {
    display: flex;
    flex-wrap: nowrap;
    padding: 0;
    margin: 0;
  }

  #ast-desktop-header .main-header-menu > li {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
  }

  /* Navigation links */
  #ast-desktop-header .main-header-menu > li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 35px;
    padding: 0;
    white-space: nowrap;
    background: transparent;
    color: #798189;
    font-family: "Open Sans", sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 35px;
    text-transform: uppercase;
  }

  /* Active page */
  #ast-desktop-header .main-header-menu > .current-menu-item > a,
  #ast-desktop-header .main-header-menu > .current_page_item > a {
    color: #fff;
    font-weight: 600;
  }

  /* Hover and keyboard focus */
  #ast-desktop-header .main-header-menu > li > a:hover,
  #ast-desktop-header .main-header-menu > li > a:focus-visible {
    color: #fff;
  }
}


/* ==================================================
   Erick Beaulieu - Home Desktop Navigation
   Applies to Gutenberg test page ID 1998
   ================================================== */

@media (min-width: 922px) {

  /* White header background */
  body:is(.page-id-1998,.page-id-6) #ast-desktop-header .ast-primary-header-bar {
    background-color: #ffffff;
  }

  /* White navigation background */
  body:is(.page-id-1998,.page-id-6) #ast-desktop-header .main-header-menu {
    background-color: #ffffff;
  }

  /* Spacing between buttons */
  body:is(.page-id-1998,.page-id-6) #ast-desktop-header .main-header-menu > li {
    padding-right: 10px;
  }

  /* Smaller spacing on the final two buttons */
  body:is(.page-id-1998,.page-id-6) #ast-desktop-header .main-header-menu > li:nth-last-child(2) {
    padding-right: 5px;
  }

  body:is(.page-id-1998,.page-id-6) #ast-desktop-header .main-header-menu > li:last-child {
    padding-left: 5px;
    padding-right: 0;
  }

  /* Turquoise buttons */
  body:is(.page-id-1998,.page-id-6) #ast-desktop-header .main-header-menu > li > a {
    height: 35px;
    background-color: #007c88;
    color: #ffffff;
    font-family: "Open Sans", sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 35px;
    text-transform: uppercase;
    transition: background-color 0.2s linear,
                color 0.2s linear;
  }

  /* Preserve white text on current page */
  body:is(.page-id-1998,.page-id-6) #ast-desktop-header .main-header-menu > .current-menu-item > a,
  body:is(.page-id-1998,.page-id-6) #ast-desktop-header .main-header-menu > .current_page_item > a {
    color: #ffffff;
    font-weight: 400;
  }
}

@media (min-width: 922px) {

  /* Home Gutenberg test only */
  body:is(.page-id-1998,.page-id-6) #ast-desktop-header
  .main-header-menu > li {
    box-sizing: border-box;
    flex: 0 0 20%;
    width: 20%;
    min-width: 0;
  }

}

/* Home Gutenberg - Desktop header alignment */
@media (min-width: 922px) {
    body:is(.page-id-1998,.page-id-6)
    #ast-desktop-header
    .site-primary-header-wrap.ast-builder-grid-row-container {
        align-content: start;
    }
}


/* ==========================================
   Home - Desktop navigation hover colors
   ========================================== */

@media (min-width: 922px) {

  /* 1. MES SERVICES - Orange */
  body:is(.page-id-1998,.page-id-6) #ast-desktop-header
  .main-header-menu > li:nth-child(1) > a:hover,
  body:is(.page-id-1998,.page-id-6) #ast-desktop-header
  .main-header-menu > li:nth-child(1) > a:focus-visible {
    background-color: #e2681c;
    color: #fff;
  }

  /* 2. MON EXPERTISE - Light blue */
  body:is(.page-id-1998,.page-id-6) #ast-desktop-header
  .main-header-menu > li:nth-child(2) > a:hover,
  body:is(.page-id-1998,.page-id-6) #ast-desktop-header
  .main-header-menu > li:nth-child(2) > a:focus-visible {
    background-color: #4dbecf;
    color: #fff;
  }

  /* 3. EN SAVOIR PLUS - Brown */
  body:is(.page-id-1998,.page-id-6) #ast-desktop-header
  .main-header-menu > li:nth-child(3) > a:hover,
  body:is(.page-id-1998,.page-id-6) #ast-desktop-header
  .main-header-menu > li:nth-child(3) > a:focus-visible {
    background-color: #998b7e;
    color: #fff;
  }

  /* 4. ME JOINDRE - Yellow */
  body:is(.page-id-1998,.page-id-6) #ast-desktop-header
  .main-header-menu > li:nth-child(4) > a:hover,
  body:is(.page-id-1998,.page-id-6) #ast-desktop-header
  .main-header-menu > li:nth-child(4) > a:focus-visible {
    background-color: #e5b53a;
    color: #fff;
  }

  /* 5. ENGLISH - Dark blue */
  body:is(.page-id-1998,.page-id-6) #ast-desktop-header
  .main-header-menu > li:nth-child(5) > a:hover,
  body:is(.page-id-1998,.page-id-6) #ast-desktop-header
  .main-header-menu > li:nth-child(5) > a:focus-visible {
    background-color: #404b56;
    color: #fff;
  }
}




/* ==========================================================
   ERICK BEAULIEU - ASTRA MOBILE NAVIGATION
   Breakpoint: 921px
   ========================================================== */

@media (max-width: 921px) {

  
/* --------------------------------------------------------
   1. MOBILE HOME LAYOUT
   Header -> Hero -> Content -> Footer
   -------------------------------------------------------- */

body:is(.page-id-1998,.page-id-6) #page {
  display: flex;
  flex-direction: column;
}

body:is(.page-id-1998,.page-id-6) #page > #masthead {
  order: 1;
  position: relative;
  width: 100%;
  z-index: 999;
}

body:is(.page-id-1998,.page-id-6) #page > .ebsc-hero {
  order: 2;
}

body:is(.page-id-1998,.page-id-6) #page > #content {
  order: 3;
}

body:is(.page-id-1998,.page-id-6) #page > .ebsc-footer {
  order: 4;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}
	
  /* --------------------------------------------------------
     2. MOBILE HEADER BAR
     -------------------------------------------------------- */

  body:is(.page-id-1998,.page-id-6)
  #ast-mobile-header .ast-primary-header-bar {
    background-color: #404b56;
  }

  body:is(.page-id-1998,.page-id-6)
  #ast-mobile-header .site-primary-header-wrap {
    min-height: 55px;
  }

  /* Mobile menu toggle */
  #ast-mobile-header .menu-toggle {
    color: #ffffff;
  }

  /* --------------------------------------------------------
     3. MOBILE FLYOUT PANEL
     -------------------------------------------------------- */

  .ast-mobile-popup-drawer {
    z-index: 100000;
  }

  .ast-mobile-popup-drawer.ast-mobile-popup-right
  .ast-mobile-popup-inner {
    width: 270px;
    max-width: 100%;
    background-color: #222533;
  }

/* --------------------------------------------------------
   4. FLYOUT CLOSING ANIMATION
   -------------------------------------------------------- */

/* Keep the drawer visible while it slides out */
.ast-mobile-popup-drawer.ast-mobile-popup-right:not(.active) {
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.25s ease-out,
    visibility 0s linear 0.25s;
}

/* Smooth slide in both directions */
.ast-mobile-popup-drawer.ast-mobile-popup-right
.ast-mobile-popup-inner {
  transition: transform 0.25s ease-in-out;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .ast-mobile-popup-drawer.ast-mobile-popup-right,
  .ast-mobile-popup-drawer.ast-mobile-popup-right
  .ast-mobile-popup-inner {
    transition-duration: 0s;
  }
}

  /* --------------------------------------------------------
     5. FLYOUT CLOSE BUTTON
     -------------------------------------------------------- */

  .ast-mobile-popup-drawer.ast-mobile-popup-right
  .ast-mobile-popup-header {
    position: absolute;
    top: 0;
    right: 0;
    width: auto;
    z-index: 10;
    background: transparent;
  }

  .ast-mobile-popup-drawer .menu-toggle-close {
    color: #ffffff;
  }

  /* --------------------------------------------------------
     6. FLYOUT NAVIGATION CONTAINERS
     -------------------------------------------------------- */

  .ast-mobile-popup-drawer .ast-mobile-popup-content {
    margin-top: 0;
    padding-top: 0;
    background-color: #222533;
  }

  .ast-mobile-popup-drawer
  .ast-builder-menu-mobile
  .main-navigation
  .main-header-menu {
    background-color: #222533;
    background-image: none;
  }

  /* --------------------------------------------------------
     7. MOBILE MENU LINKS
     -------------------------------------------------------- */

  .ast-mobile-popup-drawer
  .ast-builder-menu-mobile
  .main-navigation
  .main-header-menu > li > .menu-link {
    display: flex;
    align-items: center;
    height: 48px;
    min-height: 48px;
    padding: 0 13px;

    background-color: #222533;
    background-image: none;
    color: #ffffff;

    font-family: "Open Sans", sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 48px;
    text-transform: uppercase;

    transition: background-color 0.2s linear;
  }

  /* --------------------------------------------------------
     8. ACTIVE, HOVER AND KEYBOARD FOCUS
     -------------------------------------------------------- */

  .ast-mobile-popup-drawer
  .ast-builder-menu-mobile
  .main-navigation
  .main-header-menu > li.current-menu-item > .menu-link,
  .ast-mobile-popup-drawer
  .ast-builder-menu-mobile
  .main-navigation
  .main-header-menu > li.current_page_item > .menu-link {
    background-color: #191b26;
    color: #ffffff;
  }

  .ast-mobile-popup-drawer
  .ast-builder-menu-mobile
  .main-navigation
  .main-header-menu > li > .menu-link:hover,
  .ast-mobile-popup-drawer
  .ast-builder-menu-mobile
  .main-navigation
  .main-header-menu > li > .menu-link:focus-visible {
    background-color: #191b26;
    color: #ffffff;
  }

  /* Temporary HOME active state for Gutenberg test page */
  body:is(.page-id-1998,.page-id-6)
  .ast-mobile-popup-drawer
  .ast-builder-menu-mobile
  .main-navigation
  .main-header-menu > li:first-child > .menu-link {
    background-color: #191b26;
    color: #ffffff;
  }

}


/* ==========================================================
   MOBILE MENU - FOCUS STATES
   ========================================================== */

@media (max-width: 921px) {

  /* No focus ring on mouse/touch interaction */
  #ast-mobile-header .menu-toggle:focus:not(:focus-visible),
  .ast-mobile-popup-drawer .menu-toggle-close:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
  }

  /* Preserve accessible keyboard focus */
  #ast-mobile-header .menu-toggle:focus-visible,
  .ast-mobile-popup-drawer .menu-toggle-close:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
  }

}



/* ==========================================================
   MES SERVICES - GUTENBERG MIGRATION TEST (PAGE 2052)
   ========================================================== */

body:is(.page-id-2052,.page-id-8) {
  --eb-services-orange: #e2681c;
  --eb-content-width: 1170px;
}

/* Remove Astra's extra content spacing */
body:is(.page-id-2052,.page-id-8) .site-content,
body:is(.page-id-2052,.page-id-8) .ast-container,
body:is(.page-id-2052,.page-id-8) .site-main,
body:is(.page-id-2052,.page-id-8) .entry-content {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

body:is(.page-id-2052,.page-id-8) .entry-content {
  margin: 0;
}

/* Full-width Gutenberg sections */
body:is(.page-id-2052,.page-id-8) .entry-content > .eb-interior-intro,
body:is(.page-id-2052,.page-id-8) .entry-content > .eb-interior-title,
body:is(.page-id-2052,.page-id-8) .entry-content > .eb-interior-content {
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
}

/* White introduction */
body:is(.page-id-2052,.page-id-8) .eb-interior-intro {
  background: #ffffff;
  padding: 25px max(20px, calc((100% - var(--eb-content-width)) / 2));
}

body:is(.page-id-2052,.page-id-8) .eb-interior-intro__columns {
  max-width: var(--eb-content-width);
  margin: 0 auto;
  align-items: center;
  gap: 30px;
}

/* Handwritten introductory text */
body:is(.page-id-2052,.page-id-8) .eb-interior-intro p {
  font-family: "Caveat", cursive;
  font-size: 28px;
  line-height: 1.2;
  color: #007c88;
}

/* Logo */
body:is(.page-id-2052,.page-id-8) .eb-interior-intro .wp-block-image {
  margin: 0;
}

body:is(.page-id-2052,.page-id-8) .eb-interior-intro .wp-block-image img {
  width: 180px;
  height: auto;
  display: block;
}

/* Orange title */
body:is(.page-id-2052,.page-id-8) .eb-interior-title {
  background: var(--eb-services-orange);
  padding: 35px max(20px, calc((100% - var(--eb-content-width)) / 2)) 25px;
}

body:is(.page-id-2052,.page-id-8) .eb-interior-title h1 {
  max-width: var(--eb-content-width);
  margin: 0 auto;
  color: #ffffff;
  font-family: "Open Sans", sans-serif;
  font-size: 27px;
  line-height: 1.2;
  font-weight: 400;
}

/* Orange content */
body:is(.page-id-2052,.page-id-8) .eb-interior-content {
  background: var(--eb-services-orange);
  padding: 0 max(20px, calc((100% - var(--eb-content-width)) / 2)) 10px;
  margin-bottom: 94px !important;
}

body:is(.page-id-2052,.page-id-8) .eb-interior-columns {
  max-width: var(--eb-content-width);
  margin: 0 auto;
  gap: 30px;
  align-items: flex-start;
}

/* Typography */
body:is(.page-id-2052,.page-id-8) .eb-interior-content {
  color: #ffffff;
  font-family: "Open Sans", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  background: var(--eb-services-orange);
  padding: 0 max(20px, calc((100% - var(--eb-content-width)) / 2)) 104px;
  margin-bottom: 0 !important;
}

body:is(.page-id-2052,.page-id-8) .eb-interior-content h2 {
  font-size: 19px;
  line-height: 1.2;
  color: #ffffff;
}

body:is(.page-id-2052,.page-id-8) .eb-interior-content h3 {
  font-size: 17px;
  color: #ffffff;
}

body:is(.page-id-2052,.page-id-8) .eb-interior-content a {
  color: inherit;
  text-decoration: underline;
}

body:is(.page-id-2052,.page-id-8) .eb-interior-content p,
body:is(.page-id-2052,.page-id-8) .eb-interior-content li {
  font-size: 15px;
  line-height: 1.6;
}

/* Media */
body:is(.page-id-2052,.page-id-8) .eb-interior-content .wp-block-image img {
  max-width: 100%;
  height: auto;
}

/* Mobile */
@media (max-width: 767px) {

  body:is(.page-id-2052,.page-id-8) .eb-interior-intro {
    padding: 25px 20px;
  }

  body:is(.page-id-2052,.page-id-8) .eb-interior-intro__columns {
    display: block;
  }

  body:is(.page-id-2052,.page-id-8) .eb-interior-intro__columns > .wp-block-column:first-child {
    display: none;
  }

  body:is(.page-id-2052,.page-id-8) .eb-interior-intro p {
    font-size: 26px;
  }

  body:is(.page-id-2052,.page-id-8) .eb-interior-title {
    padding: 35px 20px 25px;
  }

  body:is(.page-id-2052,.page-id-8) .eb-interior-title h1 {
    font-size: 27px;
  }

  body:is(.page-id-2052,.page-id-8) .eb-interior-content {
    padding: 0 10px 105px;
    margin-bottom: 0 !important;
  }

  body:is(.page-id-2052,.page-id-8) .eb-interior-columns {
    display: flex;
    flex-direction: column;
    gap: 30px;
  }

  body:is(.page-id-2052,.page-id-8) .eb-interior-columns > .wp-block-column {
    width: 100%;
    flex-basis: auto !important;
  }
}

/* ==========================================================
   EB SERVICES MOBILE ALIGNMENT V1
   Based on TheFox production comparison at 430px
   ========================================================== */

@media (max-width: 767px) {

  /* Match original 10px horizontal content spacing */
  body:is(.page-id-2052,.page-id-8) .eb-interior-intro {
    padding-left: 10px;
    padding-right: 10px;
  }

  body:is(.page-id-2052,.page-id-8) .eb-interior-title {
    padding-left: 10px;
    padding-right: 10px;
  }

  body:is(.page-id-2052,.page-id-8) .eb-interior-content {
    padding-left: 10px;
    padding-right: 10px;
  }

  /* Original handwritten introduction */
  body:is(.page-id-2052,.page-id-8) .eb-interior-intro p {
    font-family: "Caveat", cursive;
    font-size: 28px;
    line-height: 28px;
  }

  /* Original heading typography */
  body:is(.page-id-2052,.page-id-8) .eb-interior-title h1 {
    font-size: 27px;
    line-height: 32px;
  }

  body:is(.page-id-2052,.page-id-8) .eb-interior-content h2 {
    font-size: 19px;
    line-height: 22px;
    padding-bottom: 10px;
  }

  body:is(.page-id-2052,.page-id-8) .eb-interior-content h3 {
    font-size: 20px;
    line-height: 24px;
    margin-bottom: 10px;
  }

  /* Prevent duplicate Gutenberg paragraph spacing */
  body:is(.page-id-2052,.page-id-8) .eb-interior-content .wp-block-column > p {
    margin-top: 0;
    margin-bottom: 24px;
  }

  /* Restore compact list typography */
  body:is(.page-id-2052,.page-id-8) .eb-interior-content ul,
  body:is(.page-id-2052,.page-id-8) .eb-interior-content li {
    font-size: 15px;
    line-height: 19px;
  }

  body:is(.page-id-2052,.page-id-8) .eb-interior-content ul {
    margin-top: 0;
    margin-bottom: 0;
  }

}

/* ==========================================================
   EB SERVICES IMAGE ALIGNMENT V1
   ========================================================== */

@media (max-width: 767px) {

  /* Center editorial images inside Gutenberg columns */
  body:is(.page-id-2052,.page-id-8) .eb-interior-content .wp-block-image:not(:has(img[src*="EB_Orienteur_Icon"])) {
    display: flex;
    justify-content: center;
    text-align: center;
  }

  body:is(.page-id-2052,.page-id-8) .eb-interior-content .wp-block-image:not(:has(img[src*="EB_Orienteur_Icon"])) > a {
    display: block;
    max-width: 100%;
  }

  body:is(.page-id-2052,.page-id-8) .eb-interior-content .wp-block-image:not(:has(img[src*="EB_Orienteur_Icon"])) img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-left: auto;
    margin-right: auto;
  }

}

/* ==========================================================
   EB SERVICES MOBILE FINISH V1
   Final visual alignment with TheFox production
   ========================================================== */

@media (max-width: 767px) {

  /* 1. Quote image: reduce space before the following text */
  body:is(.page-id-2052,.page-id-8)
  .eb-interior-content
  figure:has(img[src*="william-arthur-ward-citation"])
  + p {
    margin-top: 9px;
  }

  /* 2. X icon: align with the accompanying text */
  body:is(.page-id-2052,.page-id-8)
  .eb-interior-content
  figure:has(img[src*="EB_Orienteur_Icon"]) {
    display: block;
    float: left;
    width: 34px;
    margin: 0 12px 0 0 !important;
  }

  body:is(.page-id-2052,.page-id-8)
  .eb-interior-content
  figure:has(img[src*="EB_Orienteur_Icon"]) + p {
    margin: 0 0 20px;
    min-height: 34px;
    line-height: 34px;
  }

  body:is(.page-id-2052,.page-id-8)
  .eb-interior-content
  .wp-block-column > h2 {
    clear: both;
  }

  /* 3. Slightly increase spacing between list items */
  body:is(.page-id-2052,.page-id-8)
  .eb-interior-content
  .wp-block-list li + li {
    margin-top: 3px;
  }

  /* 4. Espace Parents banner spacing */
  body:is(.page-id-2052,.page-id-8)
  .eb-interior-content
  figure:has(img[src*="Banniere-Espace-parents"]) {
    margin-top: 12px;
  }

}

/* ==========================================================
   EB SERVICES MOBILE CLOSE V1
   ========================================================== */

@media (max-width: 767px) {

  /* 1. Keep Astra header visible during scrolling */
  body:is(.page-id-2052,.page-id-8) #masthead {
    position: sticky;
    top: 0;
    z-index: 99;
  }

  body.admin-bar:is(.page-id-2052,.page-id-8) #masthead {
    top: 0;
  }

  /* 2. Spacing below the first editorial image */
  body:is(.page-id-2052,.page-id-8)
  .eb-interior-content
  figure:has(img[src*="william-arthur-ward-citation"]) {
    margin-bottom: 24px !important;
  }

  /* 3. Final services list spacing */
  body:is(.page-id-2052,.page-id-8) .eb-interior-content .wp-block-list li {
    margin-bottom: 10px;
  }

  body:is(.page-id-2052,.page-id-8) .eb-interior-content .wp-block-list li:last-child {
    margin-bottom: 0;
  }

}

/* ==========================================================
   EB ASTRA MOBILE HEADER 55PX
   ========================================================== */

@media (max-width: 767px) {

  #ast-mobile-header .ast-primary-header-bar,
  #ast-mobile-header .site-primary-header-wrap,
  #ast-mobile-header .ast-builder-grid-row {
    height: 55px !important;
    min-height: 55px !important;
    align-items: center !important;
  }

}

/* ==========================================================
   EB SERVICES DESKTOP ALIGNMENT V1
   TheFox production reference: 1393px
   ========================================================== */

@media (min-width: 768px) {

  /* 1. Introduction: match original 160px section */
  body:is(.page-id-2052,.page-id-8) .eb-interior-intro {
    padding-bottom: 34px;
  }

  /* 2. Title: reproduce original two-line heading */
  body:is(.page-id-2052,.page-id-8) .eb-interior-title h1 {
    max-width: 570px;
    margin-left: 0;
    margin-right: 0;
    font-size: 27px;
    line-height: 32px;
    font-weight: 400;
  }

  /* 3. Original heading typography */
  body:is(.page-id-2052,.page-id-8) .eb-interior-content h2 {
    font-size: 19px;
    line-height: 22px;
    padding-bottom: 10px;
  }

  body:is(.page-id-2052,.page-id-8) .eb-interior-content h3 {
    font-size: 20px;
    line-height: 24px;
    margin-bottom: 10px;
  }

  /* 4. Normalize Gutenberg paragraph spacing */
  body:is(.page-id-2052,.page-id-8)
  .eb-interior-content
  .wp-block-column > p {
    margin-top: 0;
    margin-bottom: 24px;
  }

  /* 5. Center editorial images */
  body:is(.page-id-2052,.page-id-8)
  .eb-interior-content
  .wp-block-image:not(:has(img[src*="EB_Orienteur_Icon"])) {
    display: flex;
    justify-content: center;
    text-align: center;
  }

  body:is(.page-id-2052,.page-id-8)
  .eb-interior-content
  .wp-block-image:not(:has(img[src*="EB_Orienteur_Icon"])) > a {
    display: block;
    max-width: 100%;
  }

  body:is(.page-id-2052,.page-id-8)
  .eb-interior-content
  .wp-block-image:not(:has(img[src*="EB_Orienteur_Icon"])) img {
    display: block;
    max-width: 100%;
    height: auto;
  }

  /* 6. X icon and accompanying text */
  body:is(.page-id-2052,.page-id-8)
  .eb-interior-content
  figure:has(img[src*="EB_Orienteur_Icon"]) {
    display: block;
    float: left;
    width: 34px;
    margin: 0 12px 0 0 !important;
  }

  body:is(.page-id-2052,.page-id-8)
  .eb-interior-content
  figure:has(img[src*="EB_Orienteur_Icon"]) + p {
    margin: 0 0 20px;
    min-height: 34px;
    line-height: 34px;
  }

  body:is(.page-id-2052,.page-id-8) .eb-interior-content h2 {
    clear: both;
  }

  /* 7. Match original list typography */
  body:is(.page-id-2052,.page-id-8)
  .eb-interior-content ul,
  body:is(.page-id-2052,.page-id-8)
  .eb-interior-content li {
    font-size: 15px;
    line-height: 19px;
  }

  body:is(.page-id-2052,.page-id-8)
  .eb-interior-content
  .wp-block-list li {
    margin-bottom: 10px;
  }

}

/* ==========================================================
   EB SERVICES DESKTOP FINE TUNE V2
   ========================================================== */
@media (min-width: 768px) {

  /* H1 left aligned like production */
  body:is(.page-id-2052,.page-id-8) .eb-interior-title {
    text-align: left;
  }

  body:is(.page-id-2052,.page-id-8) .eb-interior-title h1 {
    max-width: 570px;
    margin: 0;
    text-align: left;
  }

  /* Generic spacing under editorial images */
  body:is(.page-id-2052,.page-id-8) .eb-interior-content .wp-block-image:not(:has(img[src*="EB_Orienteur_Icon"])) {
    margin-bottom: 24px;
  }

  /* First quote image */
  body:is(.page-id-2052,.page-id-8) .eb-interior-content .wp-block-image:has(img[src*="william-arthur-ward-citation"]) {
    margin-bottom: 24px;
  }

  /* Elephant image */
  body:is(.page-id-2052,.page-id-8) .eb-interior-content .wp-block-image:has(img[src*="Capture-decran-le-2022-12-18-a-14.11.09"]) {
    margin-bottom: 24px;
  }

  /* Keep the "(cliquez l'image)" text with some breathing room */
  body:is(.page-id-2052,.page-id-8) .eb-interior-content .wp-block-image:has(img[src*="Capture-decran-le-2022-12-18-a-14.11.09"]) + p {
    margin-top: 0;
    margin-bottom: 24px;
    text-align: center;
  }

}


@media (min-width: 768px) {
  body:is(.page-id-2052,.page-id-8) .eb-interior-title > h1.wp-block-heading {
    max-width: 570px;
    margin-left: 0 !important;
    margin-right: auto !important;
    text-align: left;
  }
}

/* EB GLOBAL HIDE BACK TO TOP V1 */
#ast-scroll-top,
.ast-scroll-to-top,
.scroll-to-top,
#back-to-top,
.back-to-top,
.scrolltop {
  display: none !important;
}

/* ==========================================================
   EB INTERIOR STICKY HEADER V1
   Interior Gutenberg test pages only
   Home excluded
   ========================================================== */

body:is(
  :is(.page-id-2052,.page-id-8),
  .page-id-2062,
  .page-id-2065,
  .page-id-2071
) #masthead {
  position: sticky !important;
  top: 0;
  z-index: 999;
}


/* EB MOBILE DRAWER EXIT FIX V2 */
@media (max-width: 921px) {

  .ast-mobile-popup-drawer.ast-mobile-popup-right {
    transition:
      opacity 250ms ease-out,
      visibility 0s linear 250ms !important;
  }

  .ast-mobile-popup-drawer.ast-mobile-popup-right.active {
    transition:
      opacity 250ms ease-out,
      visibility 0s linear 0s !important;
  }

  .ast-mobile-popup-drawer.ast-mobile-popup-right
  .ast-mobile-popup-inner {
    opacity: 1 !important;
    transition: transform 250ms ease-in-out !important;
  }

  .ast-mobile-popup-drawer.ast-mobile-popup-right:not(.active)
  .ast-mobile-popup-inner {
    visibility: visible !important;
  }
}

/* Respect reduced-motion accessibility preferences */
@media (max-width: 921px) and (prefers-reduced-motion: reduce) {

  .ast-mobile-popup-drawer.ast-mobile-popup-right,
  .ast-mobile-popup-drawer.ast-mobile-popup-right.active,
  .ast-mobile-popup-drawer.ast-mobile-popup-right
  .ast-mobile-popup-inner {
    transition-duration: 0s !important;
  }

  .ast-mobile-popup-drawer.ast-mobile-popup-right:not(.active) {
    visibility: hidden !important;
  }

  .ast-mobile-popup-drawer.ast-mobile-popup-right:not(.active)
  .ast-mobile-popup-inner {
    visibility: hidden !important;
  }
}

/* EB MOBILE MENU POLISH V1 */
@media (max-width: 921px) {

  /* 1. Drawer starts at top, including logged-in views */
  body.admin-bar .ast-mobile-popup-drawer,
  body.admin-bar .ast-mobile-popup-drawer .ast-mobile-popup-inner {
    top: 0 !important;
  }

  /* 2. Home: sticky mobile header */
  body:is(.page-id-6,.page-id-1998) #page > #masthead {
    position: sticky !important;
    top: 0;
    z-index: 1000;
    width: 100%;
    align-self: stretch;
  }

  /* 3. Original TheFox-style menu separators */
  .ast-mobile-popup-drawer
  .ast-builder-menu-mobile
  .main-navigation
  .main-header-menu > li {
    border-top: 1px solid rgba(255,255,255,.05);
    border-bottom: 1px solid rgba(0,0,0,.35);
  }

  /* Avoid double-thick adjacent borders */
  .ast-mobile-popup-drawer
  .main-header-menu > li + li {
    border-top: 0;
  }

  /* 4. Home button highlighted on Home */
  body:is(.page-id-6,.page-id-1998)
  .ast-mobile-popup-drawer
  .ast-builder-menu-mobile
  .main-navigation
  .main-header-menu > li:first-child > .menu-link {
    background-color: #191b26 !important;
    color: #fff !important;
  }

  /* 5. Remove touch highlights */
  #ast-mobile-header .menu-toggle,
  .ast-mobile-popup-drawer .menu-toggle-close,
  .ast-mobile-popup-drawer .main-header-menu .menu-link {
    -webkit-tap-highlight-color: transparent;
  }

  /* 6. Remove unwanted mouse/touch focus decoration */
  #ast-mobile-header .menu-toggle:focus:not(:focus-visible),
  .ast-mobile-popup-drawer .menu-toggle-close:focus:not(:focus-visible),
  .ast-mobile-popup-drawer .main-header-menu .menu-link:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
  }

  /* 7. Preserve a clean keyboard focus indicator */
  #ast-mobile-header .menu-toggle:focus-visible,
  .ast-mobile-popup-drawer .menu-toggle-close:focus-visible,
  .ast-mobile-popup-drawer .main-header-menu .menu-link:focus-visible {
    outline: 2px solid #fff !important;
    outline-offset: -3px;
    box-shadow: none !important;
  }
}

/* EB MOBILE MENU PRODUCTION MATCH V1 */
@media (max-width: 921px) {

  /* TheFox row dimensions and separators */
  .ast-mobile-popup-drawer
  .ast-builder-menu-mobile
  .main-navigation
  .main-header-menu > li {
    display: list-item !important;
    list-style: none !important;
    box-sizing: border-box;
    width: 270px;
    max-width: 100%;
    height: 49px;
    min-height: 49px;
    padding: 0;
    margin: 0;
    background-color: transparent;
    border-top: 1px solid rgba(255,255,255,.05);
    border-bottom: 1px solid rgba(0,0,0,.35);
  }

  /* Restore separators on every row */
  .ast-mobile-popup-drawer
  .main-header-menu > li + li {
    border-top: 1px solid rgba(255,255,255,.05);
  }

  /* TheFox link typography, dimensions and padding */
  .ast-mobile-popup-drawer
  .ast-builder-menu-mobile
  .main-navigation
  .main-header-menu > li > .menu-link {
    display: inline-block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 47px !important;
    min-height: 47px !important;
    padding: 10px 20px 13px !important;
    margin: 0 !important;
    background-color: transparent !important;
    color: #fff !important;
    font-family: "Open Sans", sans-serif !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 24px !important;
    text-transform: uppercase;
    letter-spacing: normal;
    text-align: left;
  }

  /* Current page background belongs to the row */
  .ast-mobile-popup-drawer
  .main-header-menu > li.current-menu-item,
  .ast-mobile-popup-drawer
  .main-header-menu > li.current_page_item {
    background-color: #191b26;
  }

  /* Highlight Home in the mobile menu on Home */
  body:is(.page-id-6,.page-id-1998)
  .ast-mobile-popup-drawer
  .main-header-menu > li:first-child {
    background-color: #191b26;
  }

  /* Override the old Home active-link background */
  body:is(.page-id-6,.page-id-1998)
  .ast-mobile-popup-drawer
  .ast-builder-menu-mobile
  .main-navigation
  .main-header-menu > li:first-child > .menu-link {
    background-color: transparent !important;
  }

  /* Preserve hover and keyboard-focus highlighting */
  .ast-mobile-popup-drawer
  .ast-builder-menu-mobile
  .main-navigation
  .main-header-menu > li > .menu-link:hover,
  .ast-mobile-popup-drawer
  .ast-builder-menu-mobile
  .main-navigation
  .main-header-menu > li > .menu-link:focus-visible {
    background-color: #191b26 !important;
  }

}

/* EB HEADER GLOBAL STICKY V1 */

/* Mobile: sticky on every page */
@media (max-width: 921px) {
  #masthead {
    position: sticky !important;
    top: 0 !important;
    width: 100%;
    z-index: 9999 !important;
  }

  /* TheFox-equivalent active row */
  .ast-mobile-popup-drawer
  .ast-builder-menu-mobile
  .main-navigation
  .main-header-menu > li:is(
    .current-menu-item,
    .current_page_item
  ) {
    background-color: #191b26 !important;
  }

  /* Home active row */
  body:is(.page-id-6,.page-id-1998)
  .ast-mobile-popup-drawer
  .ast-builder-menu-mobile
  .main-navigation
  .main-header-menu > li:first-child {
    background-color: #191b26 !important;
  }
}

/* Desktop: sticky except Home */
@media (min-width: 922px) {
  body:not(.home) #masthead {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
  }
}

/* EB EDITORIAL LINKS V1 */
/*
 * Consistent bold and underline for editorial text links.
 * Excludes links containing images, SVGs, pictures and
 * WordPress button elements.
 *
 * Migrated original page IDs:
 * 6, 8, 10, 12, 14, 16, 102, 1455
 */

body:is(
  .page-id-6,
  .page-id-8,
  .page-id-10,
  .page-id-12,
  .page-id-14,
  .page-id-16,
  .page-id-102,
  .page-id-1455
)
.entry-content
:is(p, li, h1, h2, h3, h4, h5, h6)
a:not(:has(img, svg, picture)):not(.wp-element-button) {
  font-weight: 700 !important;
  text-decoration-line: underline !important;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
