/* =========================================================================
   Mupo public pages: responsive layer (phones, tablets, small laptops).
   Loaded LAST by layouts/mupo (home, about, services, corporate training,
   accreditation, courses, contact) and partials/_header (course details,
   cart, checkout, privacy, certificate verification, error pages).
   Large desktops (1201px and up) keep their current look; almost every
   rule here sits inside a max-width media query.
   ========================================================================= */

/* ---------- Everywhere: small safety rules ---------- */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
img,video,iframe{max-width:100%}
.mupo-nav a.mupo-nav__register{display:none!important}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

/* ---------- Contact page (all sizes): info + map left, form right ---------- */
.contact-layout{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)!important;grid-template-areas:"info form" "map form";align-items:start}
.contact-layout .contact-info{grid-area:info}
.contact-layout .contact-form{grid-area:form}
.contact-layout .mupo-contact-map{grid-area:map}
.contact-list li{display:flex;align-items:flex-start;gap:12px;line-height:1.45}
.contact-list li i{color:var(--red,#e30613);width:18px;flex:0 0 18px;margin-top:4px;text-align:center}
.contact-list a{color:inherit;text-decoration:none;word-break:break-word}
.contact-list a:hover{color:var(--red,#e30613)}
.contact-form__pair{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.contact-form__errors{background:#fdecee;border:1px solid #f5c2c7;color:#9b1c24;border-radius:8px;padding:10px 14px;font-size:14px;font-weight:600}
.contact-form__errors p{margin:0}
.contact-form__captcha{overflow:hidden}
.contact-form .btn{min-height:50px}

/* =========================================================================
   HEADER
   ========================================================================= */

/* Hamburger sizes (up to 1200px): the menu opens as a panel under the
   header instead of pushing it taller, and scrolls if the screen is short. */
@media (max-width:1200px){
  .mupo-navbar{position:relative!important}
  .mupo-navbar__inner{position:static!important}
  .mupo-nav{
    position:absolute!important;left:0!important;right:0!important;top:100%!important;
    width:auto!important;margin:0!important;
    padding:8px 4% 14px!important;border-top:1px solid #e6eaf2!important;border-radius:0 0 16px 16px!important;
    box-shadow:0 22px 40px rgba(6,23,56,.16)!important;
    max-height:calc(100vh - 120px);max-height:calc(100dvh - 120px);overflow-y:auto!important;overscroll-behavior:contain;
  }
  .mupo-nav a{display:flex!important;align-items:center!important;min-height:48px!important;padding:12px 6px!important;font-size:16px!important}
  .mupo-nav a::after{display:none!important}
  .mupo-nav a.active-page{background:#fdf1f2!important;border-radius:8px!important;padding-left:12px!important}
  .mupo-menu-toggle{flex:0 0 auto!important}
}

/* Tablet (621px - 980px): one-row topbar + one-row navbar = 40 + 76px */
@media (max-width:980px){
  body{padding-top:116px!important}
  .mupo-topbar{height:40px!important;padding:0!important}
  .mupo-topbar__inner{
    width:94%!important;display:flex!important;justify-content:center!important;align-items:center!important;
    gap:22px!important;flex-direction:row!important;flex-wrap:nowrap!important;padding:0!important
  }
  .mupo-topbar__inner a{font-size:13px!important;gap:7px!important}
  .mupo-topbar__inner i{font-size:12.5px!important}
  .mupo-navbar{min-height:76px!important;height:76px!important}
  .mupo-navbar__inner,.mupo-site-header--guest .mupo-navbar__inner{
    width:94%!important;display:flex!important;align-items:center!important;gap:10px!important;min-height:0!important
  }
  .mupo-logo{width:auto!important;margin-right:auto!important}
  .mupo-logo img{width:122px!important}
  .mupo-auth{order:2!important;margin-left:0!important;gap:8px!important;flex-wrap:nowrap!important}
  .mupo-auth a:not(.mupo-cart){height:42px!important;min-width:0!important;padding:0 16px!important;font-size:14px!important}
  .mupo-menu-toggle{order:3!important;width:44px!important;height:44px!important}
  .mupo-nav{max-height:calc(100vh - 116px);max-height:calc(100dvh - 116px)}
}
@media (max-width:700px){
  .mupo-topbar__inner a:nth-child(3){display:none!important}
}

/* Phone (up to 620px): 34 + 64px. Topbar = call + email icons, Register
   moves into the menu, header row = logo, cart, Login, menu. */
@media (max-width:620px){
  body{padding-top:98px!important}
  .mupo-topbar{height:34px!important}
  .mupo-topbar__inner{justify-content:space-between!important;gap:12px!important;width:92%!important}
  .mupo-topbar__inner a{font-size:12.5px!important}
  .mupo-topbar__inner a:nth-child(2) span{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important}
  .mupo-topbar__inner a:nth-child(2)::after{content:"Email us";font-size:12.5px;font-weight:800}
  .mupo-navbar{min-height:64px!important;height:64px!important}
  .mupo-navbar__inner,.mupo-site-header--guest .mupo-navbar__inner{width:92%!important;gap:8px!important}
  .mupo-logo img{width:104px!important}
  .mupo-auth{width:auto!important;grid-column:auto!important;justify-content:flex-end!important}
  .mupo-auth a.mupo-auth__signup{display:none!important}
  .mupo-auth a:not(.mupo-cart),
  .mupo-site-header--guest .mupo-auth a:not(.mupo-cart){flex:0 0 auto!important;height:40px!important;min-width:0!important;max-width:none!important;padding:0 14px!important;font-size:14px!important;border-radius:8px!important}
  .mupo-auth a.mupo-cart{width:40px!important;min-width:40px!important;height:40px!important;font-size:16px!important}
  .mupo-cart__count{top:-7px;right:-7px;min-width:20px;height:20px;line-height:16px;font-size:10.5px}
  .mupo-menu-toggle{width:42px!important;height:42px!important;font-size:18px!important}
  .mupo-nav{padding:6px 4% 14px!important;max-height:calc(100vh - 98px);max-height:calc(100dvh - 98px)}
  .mupo-nav a.mupo-nav__register{
    display:flex!important;justify-content:center!important;margin-top:10px!important;border:0!important;
    background:#e30613!important;color:#fff!important;border-radius:10px!important;font-weight:900!important
  }
}
@media (max-width:360px){
  .mupo-topbar__inner a{font-size:12px!important}
  .mupo-logo img{width:92px!important}
  .mupo-auth a:not(.mupo-cart),
  .mupo-site-header--guest .mupo-auth a:not(.mupo-cart){padding:0 11px!important;font-size:13.5px!important}
}

/* =========================================================================
   SHARED PAGE BLOCKS
   ========================================================================= */
@media (max-width:1024px){
  .section{padding:48px 5%}
  .page-hero{padding:42px 5%;min-height:0}
  .page-hero h1{font-size:clamp(28px,5.2vw,42px)!important;line-height:1.12!important}
  .section-title h2,.split h2,.contact-layout h2,.corporate-card h2,.cta h2,.newsletter h2,.newsletter h3{font-size:clamp(24px,4.4vw,34px)!important;line-height:1.15!important}
  .cta{padding:38px 5%;gap:18px}
}

/* Tablets (600px - 900px): two columns instead of one long stack */
@media (min-width:600px) and (max-width:900px){
  .grid,.grid-4,.feature-grid,.accreditation-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .course-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .stats-strip{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .stats-strip div{border-right:0!important;border-bottom:1px solid rgba(255,255,255,.12)}
  .stats-panel{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .feature-bar{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .feature-bar .feature{border-right:0!important;border-bottom:0!important;padding:8px 4px!important}
}
@media (max-width:900px){
  .newsletter{padding:26px 22px}
  .newsletter form{flex-direction:row!important;flex-wrap:wrap}
  .newsletter input{flex:1 1 220px;min-height:50px;font-size:16px}
  .newsletter button{min-height:50px;padding:0 24px;flex:0 0 auto}
  .corporate-card{padding:28px 24px}
  .cta{text-align:center}
  .cta .btn,.cta .btn-outline{margin:0!important}
  .split{gap:24px}
  .split img{border-radius:14px;width:100%;height:auto}
  .contact-layout{grid-template-columns:1fr!important;grid-template-areas:"info" "form" "map";gap:24px}
}

/* Phones */
@media (max-width:599.98px){
  .section{padding:38px 18px}
  .page-hero{padding:32px 18px}
  .page-hero small{font-size:12px}
  .page-hero p{font-size:15px}
  .section-title{margin-bottom:20px}
  .card{padding:20px}
  .card-icon{width:48px;height:48px;font-size:21px}
  .grid,.grid-4,.feature-grid,.accreditation-grid,.course-grid{gap:14px!important}
  .stats-strip{width:calc(100% - 36px);grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .stats-strip div{padding:18px 10px;border-right:0!important;border-bottom:1px solid rgba(255,255,255,.12)}
  .stats-strip strong{font-size:26px}
  .newsletter{width:calc(100% - 36px);padding:22px 18px}
  .newsletter form{flex-direction:column!important}
  .newsletter input,.newsletter button{width:100%;flex:0 0 auto}
  .corporate-card{padding:24px 18px;border-radius:14px}
  .cta{padding:34px 18px}
  .cta .btn,.cta .btn-outline{width:100%;justify-content:center}
  .contact-form{padding:18px}
  .contact-form__pair{grid-template-columns:1fr}
  .mupo-contact-map{height:260px!important;min-height:260px!important;border-radius:16px!important}
}

/* Form fields: 16px text stops iPhones from zooming in on focus */
@media (max-width:900px){
  .filters input,.filters select,.contact-form input,.contact-form select,.contact-form textarea,.newsletter input{font-size:16px!important}
}

/* =========================================================================
   HOME
   ========================================================================= */
@media (max-width:980px){
  .hero{min-height:0!important}
  .hero-text{padding:52px 5% 76px!important}
  .hero-text h5{font-size:clamp(15px,2.6vw,20px)!important;margin-bottom:10px!important}
  .hero-text h1{font-size:clamp(36px,7.4vw,56px)!important;line-height:1.02!important;letter-spacing:-1px!important}
  .hero-text p{font-size:16px;margin-bottom:24px!important}
  .hero-img{min-height:280px}
}
@media (max-width:599.98px){
  .hero-text{padding:36px 18px 64px!important;display:flex;flex-direction:column}
  .hero-text h1{font-size:clamp(32px,10vw,42px)!important}
  .hero-text p{font-size:15px;line-height:1.6!important}
  .hero-text .btn,.hero-text .btn-outline{width:100%;justify-content:center;margin:0!important;min-height:50px}
  .hero-text .btn-outline{margin-top:10px!important}
  .hero-img{min-height:200px}
  .feature-bar{width:calc(100% - 36px)!important;margin:-40px auto 28px!important;padding:16px!important;gap:12px 10px!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .feature-bar .feature{border-right:0!important;border-bottom:0!important;padding:8px 4px!important;font-size:13px!important;line-height:1.3}
  .feature-bar .feature span{font-size:22px!important;margin-bottom:6px!important}
  .content-row{gap:18px!important;margin-top:20px!important}
  .training-list{padding:18px!important}
  .training-list li{padding:11px 0!important;font-size:15px}
  .stats-panel{padding:22px!important;gap:14px!important}
  .stat h3{font-size:26px!important}
}

/* =========================================================================
   COURSE CARDS + COURSES PAGE
   ========================================================================= */
@media (max-width:900px){
  .course-body h3{font-size:17px;line-height:1.3}
  .course-body p{font-size:14px;min-height:0}
  .course-meta{font-size:13px!important}
  .course-actions a{font-size:14px!important;min-height:44px;display:inline-flex!important;align-items:center;justify-content:center;padding:10px 8px!important}
  .course-img{height:170px}
  .filters{grid-template-columns:1fr 1fr!important;padding:14px!important;gap:12px!important}
  .filters > :first-child{grid-column:1/-1}
  .filters .btn{grid-column:1/-1}
  .filter-label{font-size:12.5px}
  /* Categories: one swipeable row of chips instead of a tall stack of buttons */
  .category-buttons{
    display:flex!important;flex-wrap:nowrap!important;gap:10px!important;overflow-x:auto;
    margin-left:-5%;margin-right:-5%;padding:2px 5% 10px;
    scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:none
  }
  .category-buttons::-webkit-scrollbar{display:none}
  .category-buttons a,.category-buttons button{
    flex:0 0 auto;white-space:nowrap;padding:11px 16px!important;border-radius:999px!important;
    font-size:14px;min-height:44px;display:inline-flex;align-items:center;scroll-snap-align:start
  }
  .mupo-course-pagination .pagination{flex-wrap:wrap;justify-content:center}
  .mupo-course-pagination .page-link{min-width:42px;min-height:42px;display:inline-flex;align-items:center;justify-content:center}
}
@media (max-width:599.98px){
  .filters{grid-template-columns:1fr!important}
  .category-buttons{margin-left:-18px;margin-right:-18px;padding-left:18px;padding-right:18px}
  .course-img{height:180px}
}

/* =========================================================================
   FOOTER
   ========================================================================= */
@media (max-width:599.98px){
  .mupo-footer{margin-top:40px}
  .mupo-footer__wrap{grid-template-columns:1fr 1fr!important;column-gap:18px!important;row-gap:30px!important;padding:40px 0 28px!important;width:calc(100% - 36px)!important}
  .mupo-footer__about,.mupo-footer__contact{grid-column:1/-1!important}
  .mupo-footer__links a{font-size:14.5px;padding:3px 0}
  .mupo-footer__contact p{font-size:14.5px;word-break:break-word}
  .mupo-footer__bottom{width:calc(100% - 36px)!important;font-size:13px;text-align:left;gap:10px!important;padding-bottom:96px!important}
  .mupo-footer__bottom div{flex-wrap:wrap;gap:16px!important}
}

/* =========================================================================
   COURSE DETAILS (InfixLMS page inside the Mupo header/footer)
   ========================================================================= */
@media (max-width:991.98px){
  .course__details_head{padding-top:36px!important;padding-bottom:36px!important}
  .course__details_head .title{font-size:clamp(24px,5.4vw,36px)!important;line-height:1.18!important;margin-bottom:14px!important}
  .course__details_head .meta{gap:10px!important}
  .course__details_head .meta_item{font-size:14px!important}
  .students_also_bought h4,.font_40{font-size:clamp(22px,4.8vw,30px)!important;line-height:1.2!important}
  .more_course_section .section__title .d-flex{flex-wrap:wrap!important;align-items:flex-end!important;row-gap:8px!important}
  .more_course_section .section__title h3{font-size:clamp(22px,5vw,30px)!important;line-height:1.2!important}
  .more_course_section .section__title p{margin-bottom:0}
}
@media (max-width:599.98px){
  .course__details_head{padding-top:26px!important;padding-bottom:26px!important}
  .course__details_head .category{gap:8px!important;margin-bottom:12px!important}
  .course__details_head .meta{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px!important}
  .course__details_head .meta_item{min-width:0;padding:8px 10px!important;font-size:13px!important;line-height:1.3}
  .course__details_head .meta_item.highlight{grid-column:1/-1}
  .course__details_head .meta_item p,.course__details_head .meta_item span{overflow-wrap:anywhere}
  .more_course_section .section__title .d-flex{flex-direction:column!important;align-items:flex-start!important}
  .more_course_section .view-all-btn{width:100%}
  .more_course_section .view_all{display:inline-flex;align-items:center;gap:6px;min-height:44px}
}

/* =========================================================================
   CART, CHECKOUT AND OTHER LMS PAGES ON SMALL SCREENS
   ========================================================================= */
@media (max-width:599.98px){
  .container{padding-left:16px;padding-right:16px}
  .section_padding,.section_padding2,.courses_area,.blog_area{padding-top:36px!important;padding-bottom:36px!important}
  .section__title h3,.section__title h2{font-size:clamp(22px,6vw,28px)!important}
  .table-responsive{-webkit-overflow-scrolling:touch}
}

/* =========================================================================
   MUPO ASSIST + BACK TO TOP on phones
   Desktop and tablets keep the full pill. On phones the launcher becomes
   a round logo button (with the green "online" dot) so it never covers
   page buttons; the panel itself is unchanged.
   ========================================================================= */
@media (max-width:599.98px){
  html body .mupo-assist-launcher{width:60px!important;height:60px!important;padding:5px!important;border-radius:18px!important;gap:0!important;justify-content:center!important}
  html body .mupo-assist-launcher-logo{width:50px!important;height:50px!important;flex-basis:50px!important;border-radius:13px!important;position:relative;overflow:visible!important}
  html body .mupo-assist-launcher-logo img{width:42px!important;height:42px!important;border-radius:10px}
  html body .mupo-assist-launcher-copy{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important}
  html body .mupo-assist-launcher-logo::after{content:"";position:absolute;right:-5px;top:-5px;width:13px;height:13px;border-radius:50%;background:#22c55e;border:2px solid #061b3a}
  body.mupo-assist-on .back-top,body.mupo-assist-on #back-top{bottom:86px!important;right:24px!important}
}
@media (max-width:599.98px){
  .back-top{width:42px;height:42px;right:16px;bottom:16px}
}

/* Bigger touch targets on phones and tablets */
@media (max-width:980px){
  .mupo-topbar__inner a{align-self:stretch!important;min-height:34px!important}
}
@media (max-width:599.98px){
  .mupo-footer__links a{display:flex!important;align-items:center;min-height:38px;padding:0!important;margin:0!important}
  .mupo-footer__links{gap:2px!important}
  .contact-list a{display:inline-block;padding:6px 0}
}
