/* =============================================
   MOBILE OPTIMIZATION - demainlaterre.org
   Fixes: logo too large + nav too small
   ============================================= */

/* =============================================
   REMOVE LINKEDIN & YOUTUBE ICONS (all pages)
   ============================================= */

/* Hide LinkedIn icons wherever they appear */
.et-social-linkedin,
li.et-social-linkedin,
a[href*="linkedin.com"],
a[title*="LinkedIn"],
a[title*="linkedin"],
.et_pb_social_media_follow_network_link.et-social-linkedin {
  display: none !important;
}

/* Hide YouTube icons wherever they appear */
.et-social-youtube,
li.et-social-youtube,
a[href*="youtube.com"],
a[href*="youtu.be"],
a[title*="YouTube"],
a[title*="youtube"],
.et_pb_social_media_follow_network_link.et-social-youtube {
  display: none !important;
}

/* Hide Instagram icons wherever they appear */
.et-social-instagram,
li.et-social-instagram,
a[href*="instagram.com"],
a[title*="Instagram"],
a[title*="instagram"],
.et_pb_social_media_follow_network_link.et-social-instagram {
  display: none !important;
}

/* Hide Facebook icons wherever they appear */
.et-social-facebook,
li.et-social-facebook,
a[href*="facebook.com"],
a[href*="fb.com"],
a[title*="Facebook"],
a[title*="facebook"],
.et_pb_social_media_follow_network_link.et-social-facebook {
  display: none !important;
}

/* If the whole social follow bar becomes empty, hide it too */
.et_pb_social_media_follow:not(:has(li:not([class*="et-social-linkedin"]):not([class*="et-social-youtube"]):not([class*="et-social-instagram"]):not([class*="et-social-facebook"]))) {
  display: none !important;
}


/* ── TABLET (≤ 980px) ── */
@media only screen and (max-width: 980px) {

  /* --- LOGO: constrain to a compact width --- */
  .et_pb_image_0_tb_header {
    text-align: center !important;
    padding: 8px 0 !important;
  }
  .et_pb_image_0_tb_header .et_pb_image_wrap img {
    width: 160px  !important;
    max-width: 160px !important;
    height: auto  !important;
  }

  /* Reduce section vertical padding so the header is compact */
  .et_pb_section_0_tb_header.et_pb_section {
    padding-top: 8px    !important;
    padding-bottom: 8px !important;
  }

  /* --- HAMBURGER ICON: bigger & more visible --- */
  .et_pb_menu_0_tb_header .mobile_nav .mobile_menu_bar:before,
  .mobile_menu_bar:before {
    font-size: 42px !important;
    line-height: 1  !important;
  }

  /* Give the mobile nav bar more breathing room */
  .et_pb_menu_0_tb_header .et_pb_menu__wrap {
    padding: 10px 0 !important;
  }
  .et_pb_menu_0_tb_header .et_mobile_nav_menu {
    padding: 6px 0 !important;
  }

  /* --- MOBILE MENU ITEMS: larger, readable font --- */
  .et_pb_menu_0_tb_header .et_mobile_menu li > a,
  .et_mobile_menu li a {
    font-size:   18px !important;
    padding:     14px 20px !important;
    line-height: 1.5em !important;
    font-weight: 600  !important;
    letter-spacing: 0.02em !important;
  }

  /* Sub-menu items slightly smaller but still legible */
  .et_pb_menu_0_tb_header .et_mobile_menu ul li a,
  .et_mobile_menu ul li a {
    font-size: 16px  !important;
    padding:   12px 30px !important;
    font-weight: 500 !important;
  }

  /* Parent menu items that are links */
  .et_mobile_menu .menu-item-has-children > a {
    font-size: 18px !important;
  }
}

/* ── PHONE (≤ 767px) ── */
@media only screen and (max-width: 767px) {

  /* --- LOGO: even more compact on small phones --- */
  .et_pb_image_0_tb_header .et_pb_image_wrap img {
    width: 130px    !important;
    max-width: 130px !important;
    height: auto    !important;
  }

  /* Tighter header padding on phones */
  .et_pb_section_0_tb_header.et_pb_section {
    padding-top: 6px    !important;
    padding-bottom: 6px !important;
  }

  /* Keep header row compact */
  .et_pb_row_0_tb_header {
    padding-top: 6px    !important;
    padding-bottom: 6px !important;
  }

  /* --- HAMBURGER: clearly visible --- */
  .et_pb_menu_0_tb_header .mobile_nav .mobile_menu_bar:before,
  .mobile_menu_bar:before {
    font-size: 38px !important;
  }

  /* --- NAV ITEMS: readable on phone --- */
  .et_pb_menu_0_tb_header .et_mobile_menu li > a,
  .et_mobile_menu li a {
    font-size:   17px !important;
    padding:     13px 18px !important;
    line-height: 1.5em !important;
    font-weight: 600  !important;
  }

  .et_pb_menu_0_tb_header .et_mobile_menu ul li a,
  .et_mobile_menu ul li a {
    font-size: 15px !important;
    padding:   11px 28px !important;
  }
}

/* ── VERY SMALL PHONES (≤ 479px) ── */
@media only screen and (max-width: 479px) {

  .et_pb_image_0_tb_header .et_pb_image_wrap img {
    width: 110px    !important;
    max-width: 110px !important;
  }

  .et_pb_menu_0_tb_header .et_mobile_menu li > a,
  .et_mobile_menu li a {
    font-size: 16px  !important;
    padding:   12px 16px !important;
  }
}
