/* FASE5A164 — revisión transversal de UX y navegación móvil */
*,*::before,*::after{box-sizing:border-box}
@media(max-width:900px){
  html,body{max-width:100%;overflow-x:clip}
  img,svg,video,canvas,iframe{max-width:100%;height:auto}
  :is(a,button,input,select,textarea,[role="button"]){min-width:0}
  :is(button,.btn,.btn-admin,.tp-btn,.interest,[role="button"]){min-height:44px}
  :is(input,select,textarea){max-width:100%;font-size:16px!important}
  h1,h2,h3,p,td,th,label,a,button{overflow-wrap:anywhere}
  .home-carousel-hero,.home-carousel-slide{min-height:520px!important}
  .home-carousel-inner{padding:42px 16px 54px!important;align-items:flex-end!important}
  .home-carousel-copy{width:100%!important;max-width:100%!important;padding:20px!important;border-radius:18px!important;background:rgba(7,20,40,.64)!important;backdrop-filter:blur(8px)}
  .home-carousel-copy h1{font-size:clamp(32px,10vw,48px)!important;line-height:1.03!important}
  .home-carousel-actions{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  .home-carousel-actions a{width:100%!important;justify-content:center!important;text-align:center!important}
  .home-carousel-nav{width:44px!important;height:44px!important}
  .footer-v77-main{grid-template-columns:1fr!important;gap:28px!important}
  .footer-v77-bottom{display:grid!important;grid-template-columns:1fr!important;text-align:center!important;gap:14px!important}
  .footer-v77-social-bottom{justify-content:center!important;flex-wrap:wrap!important}
  .student-recovery-card,.certificate-verify-card,.lifecycle-public-card{width:min(100%,720px)!important;padding:22px 18px!important}
  .student-recovery-card h1,.certificate-verify-card h1{font-size:clamp(32px,9vw,46px)!important}

  body.px-admin #cms-main-content,body.px-admin .admin-page,body.px-admin .admin-main{min-width:0!important;max-width:100%!important}
  body.px-admin .module-hero-head,body.px-admin .course-page-headline,body.px-admin .grade-page-head{display:grid!important;grid-template-columns:1fr!important;gap:16px!important}
  body.px-admin .module-hero-actions,body.px-admin .button-row,body.px-admin .grade-head-actions{display:grid!important;grid-template-columns:1fr!important;width:100%!important;gap:9px!important}
  body.px-admin .module-hero-actions>* ,body.px-admin .button-row>* ,body.px-admin .grade-head-actions>*{width:100%!important;max-width:none!important}
  body.px-admin .module-hero-actions :is(a,button),body.px-admin .button-row :is(a,button),body.px-admin .grade-head-actions :is(a,button){width:100%!important;justify-content:center!important}
  body.px-admin .admin-card,body.px-admin .course-page-box,body.px-admin .block-card{max-width:100%!important;overflow:hidden}
  body.px-admin .course-bulk-bar-v118{grid-template-columns:1fr!important;gap:10px!important}
  body.px-admin .course-bulk-bar-v118 :is(select,button){width:100%!important}
  body.px-admin .course-list-table-wrap{overflow:visible!important}
  body.px-admin .px-responsive-data-table{min-width:0!important}
  body.px-admin .px-responsive-data-table tbody tr{box-shadow:0 8px 22px rgba(16,24,40,.05)!important}
  body.px-admin .px-responsive-data-table td{min-width:0!important}
  body.px-admin .course-actions-cell .course-action-lock{width:100%!important;text-align:center!important}
  body.px-admin .cms-v103-context{min-width:0!important;max-width:44vw!important}
  body.px-admin .cms-v103-context strong,body.px-admin .cms-v103-context span{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  body.px-admin .cms-v103-user-copy{max-width:150px!important}
  body.px-admin dialog,body.px-admin .modal,body.px-admin .dialog-card{max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important;overflow:auto!important}

  body.tp-body .tp-main{min-width:0!important;max-width:100vw!important}
  body.tp-body .tp-page-head,body.tp-body .grade-page-head{display:grid!important;grid-template-columns:1fr!important;gap:14px!important}
  body.tp-body .tp-page-head-actions,body.tp-body .grade-head-actions,body.tp-body .simple-grade-actions>div{display:grid!important;grid-template-columns:1fr!important;width:100%!important;gap:9px!important}
  body.tp-body .tp-page-head-actions :is(a,button),body.tp-body .grade-head-actions :is(a,button),body.tp-body .simple-grade-actions button{width:100%!important;justify-content:center!important}
  body.tp-body .tp-search input{font-size:16px!important}
  body.tp-body .simple-grade-panel{overflow:visible!important}
  body.tp-body .simple-grade-table{min-width:0!important;width:100%!important}
  body.tp-body .tp-card,body.tp-body .simple-group-card{max-width:100%!important}
}
@media(max-width:620px){
  .topbar .nav{grid-template-columns:minmax(0,1fr) 48px!important}
  .topbar .logo{max-width:min(205px,68vw)!important}
  body.px-admin .cms-v103-context{display:none!important}
  body.px-admin .cms-v103-user-copy{display:none!important}
  body.px-admin #cms-main-content{padding-left:10px!important;padding-right:10px!important}
  body.tp-body .tp-search{min-width:0!important}
  body.tp-body .tp-search input{width:100%!important}
  body.tp-body .tp-user-copy{display:none!important}
}
@media(max-width:380px){
  body.px-admin #cms-main-content,body.tp-body .tp-main{padding-left:8px!important;padding-right:8px!important}
}

@media(max-width:720px){
  body.tp-body table:not(.simple-grade-table){min-width:0!important;width:100%!important}
  body.tp-body table:not(.simple-grade-table) thead{display:none!important}
  body.tp-body table:not(.simple-grade-table) tbody,body.tp-body table:not(.simple-grade-table) tr,body.tp-body table:not(.simple-grade-table) td{display:block!important;width:100%!important}
  body.tp-body table:not(.simple-grade-table) tr{padding:13px!important;border:1px solid #dbe4ec!important;border-radius:14px!important;margin-bottom:12px!important;background:#fff!important}
  body.tp-body table:not(.simple-grade-table) td{padding:8px 0!important;border:0!important;text-align:left!important}
  body.tp-body table:not(.simple-grade-table) td::before{content:attr(data-label);display:block;margin-bottom:4px;color:#6b7888;font-size:10px;font-weight:850;text-transform:uppercase}
  body:not(.px-admin):not(.tp-body) .cms-page-content table{display:block!important;width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
}

/* FASE5A165G — carrusel móvil con imágenes visibles y texto legible */
@media(max-width:900px){
  .page-home .home-carousel-slide{
    background-size:cover!important;
    background-repeat:no-repeat!important;
    background-position:center center!important;
  }
  .page-home .home-carousel-shade{
    background:linear-gradient(180deg,rgba(255,255,255,.10) 0%,rgba(255,255,255,.03) 46%,rgba(7,20,40,.20) 100%)!important;
  }
  .page-home .home-carousel-copy{
    background:rgba(7,20,40,.68)!important;
    color:#fff!important;
    box-shadow:0 14px 34px rgba(7,20,40,.22)!important;
    backdrop-filter:blur(5px)!important;
    -webkit-backdrop-filter:blur(5px)!important;
  }
  .page-home .home-carousel-copy h1,
  .page-home .home-carousel-copy p{
    color:#fff!important;
    text-shadow:0 2px 12px rgba(0,0,0,.28)!important;
  }
  .page-home .home-carousel-badge{
    background:rgba(255,255,255,.92)!important;
    color:#087b35!important;
  }
}
@media(max-width:640px){
  .page-home .home-carousel-shade{
    background:linear-gradient(180deg,rgba(255,255,255,.05) 0%,rgba(7,20,40,.07) 52%,rgba(7,20,40,.28) 100%)!important;
  }
  .page-home .home-carousel-copy{
    background:rgba(7,20,40,.70)!important;
  }
}
