/* Mobile layout & TravelTech JPG fallback, 2026-11-09 */

.personal-grid,.personal-card,.personal-card>*,.learning-card,.learning-text,.work-card,
.work-copy,.outcome-grid,.outcome-grid>div,.case-real-gallery,.case-principles,
.case-principles>div{min-width:0;max-width:100%;box-sizing:border-box}
.personal-card,.learning-card,.work-card,.outcome-grid>div{height:auto;max-height:none}
.personal-card h3,.personal-card>p,.personal-action,.work-card h3,.work-card p,
.work-bottom,.learning-text h3,.learning-text p,.learning-foot,.case-principles p,
.outcome-grid strong,.outcome-grid p,.case-small,.bridge-demo-task,.moodle-map-steps,
.mirrors-workflow-route,.mirrors-workflow-bottom,.case-travel-gallery figcaption{
 min-width:0;overflow-wrap:anywhere;white-space:normal
}
.personal-graphic,.personal-graphic.bridge-demo-graphic,.personal-graphic.education-map,
.personal-graphic.mirrors-workflow{height:auto;min-height:208px;max-height:none;
 overflow:visible;flex-shrink:0;box-sizing:border-box}
.personal-card>p{flex:0 0 auto}
.personal-action{display:block;margin-top:auto}
.education-map .moodle-map-steps,.mirrors-workflow-route,
.bridge-demo-actions,.mirrors-workflow-bottom{min-width:0;max-width:100%}
.case-travel-gallery,.case-travel-gallery figure{min-width:0;max-width:100%}
.case-travel-gallery a{display:block;height:auto;min-height:0;max-width:100%;overflow:hidden;background:#f4f6f5}
.case-travel-gallery img,.real-ui-travel .product-browser img{
 display:block;width:100%;max-width:100%;height:auto;max-height:none;
 object-fit:contain;object-position:top center
}
.case-travel-gallery .case-browser-shot img{aspect-ratio:auto}
@media(max-width:900px){
 .personal-grid{grid-template-columns:minmax(0,1fr)}
 .personal-card:last-child{grid-column:auto}
 .personal-graphic,.personal-graphic.bridge-demo-graphic,.personal-graphic.education-map,
 .personal-graphic.mirrors-workflow{min-height:195px}
 .case-travel-gallery{grid-template-columns:minmax(0,1fr)}
 .case-travel-gallery .case-travel-phone{width:100%;max-width:340px;margin-inline:auto}
}
@media(max-width:420px){
 .personal-card{padding:20px}
 .personal-card>p{font-size:1rem;line-height:1.62}
 .personal-card h3{font-size:clamp(1.7rem,7.8vw,2rem)}
 .personal-action{padding-top:12px;font-size:.93rem}
 .education-map .moodle-map-steps,.mirrors-workflow-route{
  display:flex;flex-direction:column;align-items:stretch;gap:7px
 }
 .education-map .moodle-map-steps strong,.mirrors-workflow-route div{
  flex:none;width:100%;min-width:0;padding:9px 10px;font-size:.85rem;
  line-height:1.35;overflow-wrap:normal;text-align:center
 }
 .education-map .moodle-map-steps b,.mirrors-workflow-route i{
  flex:none;width:100%;text-align:center;transform:rotate(90deg);font-size:.9rem
 }
 .case-travel-gallery{gap:20px}
 .case-travel-gallery figcaption{line-height:1.5;font-size:.88rem}
}

@media(max-width:900px){
  /* The old Moodle diagram inherited a 23px top margin and 20px padding
     from obsolete rows; those values caused real content overflow at 390px. */
  .personal-graphic.education-map > .moodle-map-steps{
    margin:4px 0!important;padding:0!important;border:0!important;
  }
}

@media(max-width:420px){
  /* Accommodate the actual five-step university diagram at iPhone widths. */
  .personal-graphic.education-map{height:auto!important;min-height:370px!important}
  .personal-graphic.education-map>*{flex-shrink:0}
}

/* Avoid a blank panel on slow cellular connections while the secondary preview downloads. */
.case-travel-gallery .case-travel-phone a{position:relative;min-height:240px;background:#e5eee9}
.case-travel-gallery .case-travel-phone a::before{
 content:"Загрузка мобильного интерфейса";
 position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
 text-align:center;padding:18px;color:#496761;font:700 .91rem/1.4 Onest,Arial,sans-serif
}
.case-travel-gallery .case-travel-phone img{
 position:relative;z-index:1;width:100%;height:auto;aspect-ratio:590/1276;
 object-fit:contain;object-position:top center
}

/* Homepage TravelTech: do not crop real screenshot inside fixed-height product browser. */
body:not(.cases-page) .work-card .real-ui-travel .product-browser{
  display:block;
  flex:0 0 auto;
  height:auto;
  min-height:0;
  max-height:none;
  overflow:hidden;
  align-self:stretch;
  margin:8px 0 10px;
}
body:not(.cases-page) .work-card .real-ui-travel .product-browser img{
  display:block;
  width:100%;
  height:auto;
  min-height:0;
  max-height:none;
  aspect-ratio:1200/870;
  object-fit:contain;
  object-position:center top;
}
body:not(.cases-page) .work-card .real-ui-travel .browser-chrome{
  height:25px;
  flex-shrink:0;
  white-space:nowrap;
  overflow:hidden;
}
body:not(.cases-page) .work-card .real-ui-travel .real-ui-foot{
  flex-wrap:wrap;
  gap:6px 12px;
}

/* Main-page diagram readability on narrow mobile screens. */
@media(max-width:420px){
  .personal-graphic.education-map .moodle-map-steps{
    gap:6px;
    padding-block:7px!important;
    margin:0!important;
  }
  .education-map .moodle-map-steps b{
    width:100%;
    height:17px;
    padding:0;
    margin:0;
    line-height:17px;
    font-size:0!important;
    font-weight:800;
    letter-spacing:0;
    color:#3b6561;
    transform:none!important;
    writing-mode:horizontal-tb;
    white-space:normal;
    text-align:center;
  }
  .education-map .moodle-map-steps b:first-of-type::after{
    content:"↓   API   ↓";
    font-size:.75rem;
    letter-spacing:.075em;
  }
  .education-map .moodle-map-steps b:not(:first-of-type)::after{
    content:"↓";
    font-size:1rem;
  }
  .personal-graphic.mirrors-workflow{
    gap:12px;
    padding:16px 18px;
  }
  .mirrors-workflow-route{gap:5px}
  .mirrors-workflow-route div{
    min-height:50px;
    font-size:.83rem;
    line-height:1.25;
  }
  .mirrors-workflow-route i{
    width:100%;
    font-size:0!important;
    line-height:13px;
    height:13px;
    transform:none!important;
  }
  .mirrors-workflow-route i::after{
    content:"↓";
    font-size:.98rem;
    font-style:normal;
    font-weight:800;
  }
  .mirrors-workflow-bottom{
    margin-top:7px;
    padding-top:11px;
    gap:4px 8px;
  }
}
