/* LF3 Alumni — CLEAN responsive companion stylesheet
   Use AFTER styles.css. Replaces all older mobile-responsive.css content.
   Designed for existing LF3 HTML and app.js, including inline About artwork.
   2026-11-21
*/

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { min-width: 0; overflow-x: clip; }
#page, .section, .inner-page, .lf3-editorial { min-width: 0; }
img, svg, video { max-width: 100%; }
input, select, textarea, button { max-width: 100%; }
.shell { width: 100%; }
.country-grid > *, .profiles > *, .features > *,
.profile-layout > *, .dashgrid > *,
.lf3-editorial .lf3-grid > *,
.lf3-editorial .lf3-join-grid > * { min-width: 0; }
.modal { max-width: min(600px, calc(100vw - 30px)); max-height: calc(100dvh - 30px); overflow-y: auto; }

/* ABOUT US: actual markup in about() uses inline height and object-position.
   These selectors deliberately target that markup, not the Join page. */
.lf3-editorial > section:first-child > div:nth-child(2) {
  width: 100% !important;
  height: clamp(220px, 24vw, 300px) !important;
  max-height: 300px !important;
  overflow: hidden !important;
}
.lf3-editorial > section:first-child > div:nth-child(2) > img[src*="about-us"] {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: fill !important;
  object-position: center 30% !important;
  border-radius: 0 !important;
}
/* Ensure the About content has an attractive consistent layout. */
.lf3-editorial .lf3-body { background: #faf7f2; }
.lf3-editorial .lf3-body > .shell { max-width: 1120px; margin-inline: auto; }
.lf3-editorial .lf3-lead { max-width: 850px; margin: 0 auto 48px; text-align: center; }
.lf3-editorial .lf3-lead p { line-height: 1.9; }
.lf3-editorial .lf3-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 22px;
  margin: 0 auto 40px;
}
.lf3-editorial .lf3-tile { height: 100%; background: #fff; }
.lf3-editorial .lf3-note { max-width: 850px; margin-inline: auto; }

/* JOIN: single desktop illustration on right, never over the heading. */
@media (min-width: 768px) {
  .lf3-editorial .lf3-join-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: #faf7f2;
  }
  .lf3-editorial .lf3-join-hero::before {
    content: '';
    display: block;
    position: absolute;
    inset: 0 0 0 auto;
    width: 44%;
    height: 100%;
    background: url('./join-network.png') center right / contain no-repeat;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 13%, #000 96%);
    mask-image: linear-gradient(to right, transparent, #000 13%, #000 96%);
    z-index: -1;
  }
  .lf3-editorial .lf3-join-hero > .shell { position: relative; z-index: 1; }
  .lf3-editorial .lf3-join-hero .lf3-heading { width: 48%; max-width: 570px; text-align: left; }
  .lf3-editorial .lf3-join-mobile-art { display: none; }
}

/* Compact laptop and tablet */
@media (max-width: 1100px) {
  .shell { padding-inline: 26px; }
  .navlinks { gap: 15px; }
  .country-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 821px) and (max-width: 1000px) {
  .lf3-editorial .lf3-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* iPad and mobile navigation */
@media (max-width: 820px) {
  .shell { padding-inline: 23px; }
  .top { position: sticky; top: 0; }
  .nav {
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px 10px;
    padding-top: 11px;
    padding-bottom: 0;
  }
  .brand { grid-column: 1; grid-row: 1; min-width: 0; font-size: 18px; }
  .brand img { width: 29px !important; height: 29px !important; object-fit: contain; flex: none; }
  .lf3-language-button { grid-column: 2; grid-row: 1; margin: 0; }
  #authTop {
    grid-column: 3; grid-row: 1;
    margin: 0;
    max-width: 155px;
    padding: 10px 12px;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .navlinks {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 17px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .navlinks::-webkit-scrollbar { display: none; }
  .navlinks a { flex: none; padding: 12px 0 !important; font-size: 12px; }
  .section { padding-block: 46px; }
  .inner-page { padding-block: 42px; }
  .profile-layout { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lf3-editorial .lf3-grid { grid-template-columns: 1fr; max-width: 620px; gap: 16px; }
  .lf3-editorial .lf3-join-grid { gap: 15px; }
  .lf3-editorial .lf3-role { padding: 22px; }
  .lf3-editorial .lf3-body { padding-block: 50px 60px; }
  .lf3-editorial .lf3-lead { margin-bottom: 34px; }
  .cta { flex-wrap: wrap; }
}

/* JOIN mobile: use the real <img> in app.js, never the pseudo-element. */
@media (max-width: 767px) {
  .lf3-editorial .lf3-hero.lf3-join-hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    padding: 30px 0 12px !important;
    gap: 0 !important;
  }
  .lf3-editorial .lf3-join-hero::before { content: none !important; display: none !important; }
  .lf3-editorial .lf3-join-hero > .shell.lf3-hero-split {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: none !important;
    margin: 0 !important;
    padding: 0 22px !important;
  }
  .lf3-editorial .lf3-join-hero .lf3-heading {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
  }
  .lf3-editorial .lf3-join-hero h1 {
    margin: 0 0 16px !important;
    font-size: clamp(32px, 8vw, 43px) !important;
    line-height: 1.14 !important;
  }
  .lf3-editorial .lf3-join-hero .lf3-heading p {
    margin: 0 !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
  }
  .lf3-editorial .lf3-join-hero .lf3-join-mobile-art {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: 240px !important;
    max-width: none !important;
    min-height: 0 !important;
    flex: none !important;
    margin: 9px 0 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }
  .lf3-editorial .lf3-join-hero + .lf3-body { padding-top: 30px !important; }
}

/* Phones */
@media (max-width: 600px) {
  .shell { padding-inline: 17px; }
  .nav { gap: 7px; }
  .brand { font-size: 16px; }
  .navlinks { gap: 16px; }
  .navlinks a { font-size: 11px; }
  .lf3-language-button { padding: 7px 8px; font-size: 11px; }
  #authTop { max-width: 126px; padding: 9px 8px; font-size: 10px; }
  .hero { min-height: 0; }
  .hero-inner { padding-top: 55px; padding-bottom: 58px; }
  .hero h1 { font-size: clamp(32px, 9vw, 43px); letter-spacing: -1.4px; }
  .hero p { font-size: 14px; line-height: 1.65; }
  .searchhero { padding: 8px 9px; gap: 6px; }
  .searchhero input { font-size: 12px; }
  .searchhero button { padding: 9px 10px; font-size: 11px; }
  .country-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .country-card { min-height: 150px; padding: 14px 7px; }
  .country-card img { max-width: 75px; height: auto; }
  .country-name { font-size: 14px; overflow-wrap: anywhere; }
  .features, .dashgrid, .details, .lf3-editorial .lf3-join-grid { grid-template-columns: 1fr; }
  .filterbar { display: grid; grid-template-columns: 1fr; }
  .filterbar .search, .filterbar .filter { width: 100%; min-width: 0; }
  .profile-head { flex-wrap: wrap; }
  .profile-panel, .panel { padding: 22px; }
  .cta { display: block; padding: 24px; }
  .cta .navbutton { display: inline-block; margin: 18px 0 0; }
  .foot { flex-direction: column; align-items: flex-start; }
  .lf3-editorial .lf3-lead { text-align: left; }
  .lf3-editorial .lf3-lead p { font-size: 15px; }
  .lf3-editorial .lf3-tile, .lf3-editorial .lf3-role { padding: 22px; }
  .lf3-editorial .lf3-steps { padding: 22px 10px; }
  .lf3-editorial .lf3-step-row { gap: 3px; }
  .lf3-editorial .lf3-step span { width: 40px; height: 40px; font-size: 18px; }
  .lf3-editorial .lf3-step strong { font-size: 12px; }
  .lf3-editorial .lf3-step small { font-size: 10px; }
  .lf3-editorial .lf3-step-arrow { font-size: 14px; }
  .modal { width: min(100%, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 22px; }
  input, textarea, select { font-size: 16px; }
  /* Shorter About image on phones, retaining heads in frame. */
  .lf3-editorial > section:first-child > div:nth-child(2) {
    height: clamp(175px, 48vw, 230px) !important;
    max-height: 230px !important;
  }
}
@media (max-width: 370px) {
  .brand { font-size: 15px; }
  #authTop { max-width: 112px; }
  .country-name { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
