/* CAPES Mobile V1 — responsive finishing pass */
.mobile-nav-actions{display:none}

@media(max-width:820px){
  :root{--gutter:18px;--col-gap:14px;--section-space:54px}
  html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-top:72px}
  body{overflow-x:hidden}
  a,button,input,select,textarea{-webkit-tap-highlight-color:rgba(22,167,184,.12)}
  img,svg,video,iframe{max-width:100%}

  /* Header / mobile navigation */
  .site-header{position:sticky;top:0;z-index:100;background:rgba(255,255,255,.96);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
  .header-row{height:64px!important;padding:0 16px!important;grid-template-columns:1fr auto!important;gap:12px!important;overflow:visible!important}
  .brand-logo-official{width:104px!important;height:auto!important}
  .header-actions{gap:0!important}
  .nav-toggle{display:inline-flex!important;width:44px!important;height:44px!important;border-radius:10px!important;border:1px solid #dce6e7!important;background:#fff!important;position:relative!important}
  .nav-toggle span,.nav-toggle:before,.nav-toggle:after{content:"";position:absolute;left:12px;right:12px;height:2px;border-radius:99px;background:#17373c;transition:.2s ease}
  .nav-toggle span{top:21px}.nav-toggle:before{top:15px}.nav-toggle:after{top:27px}
  .nav-toggle[aria-expanded="true"] span{opacity:0}.nav-toggle[aria-expanded="true"]:before{top:21px;transform:rotate(45deg)}.nav-toggle[aria-expanded="true"]:after{top:21px;transform:rotate(-45deg)}
  .main-nav.is-open{display:flex!important;position:absolute!important;top:64px!important;left:0!important;right:0!important;max-height:calc(100vh - 64px);overflow:auto;flex-direction:column!important;align-items:stretch!important;padding:12px 16px calc(22px + env(safe-area-inset-bottom))!important;background:#fff!important;border-bottom:1px solid #e5ebec!important;box-shadow:0 18px 38px rgba(12,55,61,.11)!important}
  .main-nav.is-open>a{padding:15px 4px!important;border-bottom:1px solid #edf1f2!important;font-size:1rem!important;font-weight:700!important;color:#17373c!important}
  .main-nav.is-open>a[aria-current="page"]{color:#168f9d!important}
  .mobile-nav-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}
  .mobile-nav-actions a{min-height:48px!important;padding:0 12px!important;border:1px solid #dce6e7!important;border-radius:10px!important;display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;font-size:.86rem!important;font-weight:800!important}
  .mobile-nav-actions .mobile-login{color:#168f9d!important;border-color:#81d0d8!important;background:#fff!important}
  .mobile-nav-actions .mobile-register{color:#fff!important;border-color:#f07a13!important;background:#f07a13!important}

  /* Generic spacing / typography */
  .wrap{padding-inline:18px!important}
  .section{padding-block:52px!important}
  .section-tight{padding-block:40px!important}
  .page-hero{padding-top:42px!important;padding-bottom:38px!important;min-height:0!important}
  .page-hero:before{width:260px!important;height:260px!important;right:-145px!important;top:-145px!important}
  .page-hero:after{width:84px!important;height:84px!important;right:-22px!important;top:46px!important;opacity:.72!important}
  .page-hero .section-head{grid-column:1/13!important}
  .page-hero h1{font-size:clamp(2.35rem,11.5vw,3.5rem)!important;line-height:.98!important;letter-spacing:-.055em!important;max-width:11ch!important}
  .page-hero .lede{margin-top:16px!important;font-size:.98rem!important;line-height:1.58!important;max-width:34rem!important}
  .section-head .kicker,.section-head h2{font-size:clamp(1.9rem,9vw,2.75rem)!important;line-height:1.02!important}
  .section-head-flex{display:block!important}.section-head-flex>*+*{margin-top:14px!important}
  .eyebrow{font-size:.7rem!important;letter-spacing:.13em!important}
  .btn,.home-btn{min-height:50px!important;border-radius:10px!important}

  /* Catalog / cards */
  .catalog-toolbar{display:grid!important;grid-template-columns:1fr auto!important;gap:12px!important;padding:14px 0 22px!important}
  .search-field{grid-column:1/-1;min-width:0!important;width:100%!important;border-radius:10px!important}
  .search-field input{height:48px!important;font-size:16px!important}
  .catalog-layout{display:block!important;padding-bottom:54px!important}
  .filter-col{display:none!important}
  .catalog-grid,.course-list,.home-featured-grid{grid-template-columns:1fr!important;gap:14px!important}
  .course-card{border-radius:12px!important}
  .course-thumb{aspect-ratio:2/1!important}
  .course-body{padding:16px!important}
  .course-card h3{font-size:1.04rem!important;line-height:1.25!important;min-height:0!important}
  .course-foot{margin-top:14px!important}
  .text-link{font-size:.94rem!important}

  /* Editorial / content */
  .editorial-2col{grid-template-columns:1fr!important;gap:12px!important}
  .editorial-2col .col{padding:24px 20px!important}
  .values-list,.stat-row,.team-grid{grid-template-columns:1fr!important}
  .values-list .value-item{padding:24px 4px!important;border-left:0!important;border-top:1px solid #dfe8ea!important;text-align:left!important}
  .values-list .value-item:first-child{border-top:0!important}
  .stat-item{padding:24px 20px!important}
  .stat-item strong{font-size:3rem!important}
  .team-card{padding:16px!important}

  /* Forms — 16px avoids iOS auto zoom */
  .contact-layout,.checkout-layout{grid-template-columns:1fr!important;gap:28px!important}
  .field{margin-bottom:16px!important}
  .field input,.field select,.field textarea{font-size:16px!important;border-radius:10px!important}
  .field input,.field select{height:52px!important}
  .field textarea{min-height:132px!important}
  #contactForm,.checkout-card{padding:20px!important;border-radius:14px!important;box-shadow:none!important}
  #contactForm .btn,.checkout-card .btn,#profileForm .btn,#loginForm .btn,#registerForm .btn,#resetRequestForm .btn,#resetConfirmForm .btn,#instructorForm .btn{width:100%!important;justify-content:center!important}
  .contact-info-item{padding:18px!important}
  .faq-item{padding:18px 0!important}
  .checkout-summary{position:static!important;padding:20px!important;border-radius:14px!important}
  .checkout-total strong{font-size:1.2rem!important}

  /* Rows / cart / dashboard */
  .category-row{grid-template-columns:52px minmax(0,1fr) auto!important;gap:12px!important;padding:15px 0!important}
  .category-desc{display:none!important}
  .category-name{font-size:.96rem!important;line-height:1.35!important;min-width:0!important;overflow-wrap:anywhere}
  .category-num img{width:48px!important;height:48px!important}
  .cta-band{padding:22px 18px!important;border-radius:12px!important;gap:16px!important}
  .cta-band .btn{width:100%!important;justify-content:center!important}
  #dashNav{margin-inline:-18px!important;width:calc(100% + 36px)!important;padding-inline:18px!important;scroll-snap-type:x proximity}
  #dashNav a{scroll-snap-align:start;padding:12px 14px!important;font-size:.88rem!important}
  #courseHeader,#lessonHeader,#lessonBody{padding:18px!important;border-radius:13px!important}
  #courseHeader h1,#lessonHeader h1{font-size:clamp(1.8rem,9vw,2.5rem)!important;line-height:1.02!important}
  #modulesList>div{padding:14px!important;border-radius:12px!important}
  #lessonBody{font-size:.98rem!important;overflow-wrap:anywhere}
  #lessonBody iframe,#lessonBody video,#lessonBody embed{width:100%!important;max-width:100%!important;aspect-ratio:16/9;height:auto!important}
  #lessonBody table,#courseContent table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  #lessonActions{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  #lessonActions .btn{width:100%!important;justify-content:center!important}

  /* About */
  .page-hero-about{padding-bottom:16px!important}
  .about-hero-visual{height:280px!important;margin-top:6px!important}
  .about-hero-circle{width:220px!important;height:220px!important;right:8%!important;bottom:8px!important}
  .about-hero-visual:after{width:62px!important;height:62px!important;left:2%!important;top:28px!important}
  .about-hero-visual img{transform:translate(4px,-5px)!important}

  /* Footer */
  .footer-v1{padding:0 18px!important}
  .footer-main{grid-template-columns:1fr 1fr!important}
  .footer-brandbox{grid-column:1/-1!important;padding:24px 0!important;border-bottom:1px solid #e7eeee!important}
  .footer-col{padding:22px 8px!important;border-left:0!important}
  .footer-col:nth-of-type(3){border-left:1px solid #e7eeee!important;padding-left:20px!important}
  .footer-col a{font-size:.82rem!important;margin:9px 0!important}
  .footer-bottom{padding:14px 0 calc(14px + env(safe-area-inset-bottom))!important;font-size:.68rem!important}

  /* Home hero */
  .home-shell{width:calc(100% - 32px)!important}
  .hero-reference-shell{grid-template-columns:1fr!important;grid-template-rows:auto auto auto!important;min-height:0!important}
  .hero-reference-v2 .home-hero-copy{padding:38px 0 24px!important}
  .hero-reference-v2 .home-hero-copy h1{font-size:clamp(2.55rem,12vw,3.65rem)!important;line-height:.96!important;max-width:10ch!important}
  .hero-reference-v2 .home-hero-copy>p{font-size:.96rem!important;line-height:1.58!important;margin-top:16px!important}
  .hero-reference-v2 .home-hero-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;margin-top:22px!important}
  .hero-reference-v2 .home-btn{padding:0 14px!important;width:100%!important}
  .hero-reference-visual{min-height:320px!important;margin-top:4px!important;overflow:hidden!important}
  .hero-reference-photo{left:7%!important;right:-2%!important;top:0!important;bottom:0!important;border-radius:0 0 42% 42% / 0 0 15% 15%!important}
  .hero-reference-photo img{object-position:center 18%!important}
  .hero-orbit-teal{width:250px!important;height:250px!important;left:-22px!important;top:-18px!important}
  .hero-orbit-orange{width:150px!important;height:150px!important;right:-54px!important;top:118px!important}
  .hero-circle-message{width:76px!important;height:76px!important;left:0!important;top:54%!important;font-size:.39rem!important}
  .hero-handnote{display:none!important}
  .hero-impact-card{right:6px!important;bottom:10px!important;padding:9px 11px!important;font-size:.6rem!important}
  .hero-impact-icon{width:30px!important;height:30px!important}
  .hero-reference-stats{grid-template-columns:1fr 1fr!important;padding:12px 0 16px!important}
  .hero-reference-stat{padding:11px 8px!important;border-left:0!important;border-top:1px solid #e7eeee!important}
  .hero-reference-stat:nth-child(-n+2){border-top:0!important}
  .hero-reference-stat strong{font-size:.78rem!important}.hero-reference-stat span:last-child{font-size:.6rem!important}

  /* Home sections */
  .partner-section{padding:48px 16px!important}
  .partner-section h2{font-size:clamp(2.45rem,12vw,3.5rem)!important}
  .partner-logos{margin:26px auto 22px!important;padding:18px!important;border-radius:14px!important}
  .partner-logo{min-height:66px!important}.partner-logo img{max-height:50px!important}
  .partner-trust{gap:0!important}.partner-trust span{padding:12px 8px!important}
  .categories-v2{padding:38px 0 30px!important}
  .categories-v2-grid{grid-template-columns:1fr!important;gap:12px!important}
  .category-v2-card{min-height:164px!important;padding:20px 18px!important;border-radius:12px!important}
  .category-v2-icon{width:56px!important;height:56px!important;font-size:1.45rem!important}
  .category-v2-copy h3{font-size:1.5rem!important}.category-v2-copy p{font-size:.9rem!important}
  .featured-section{padding:42px 0 36px!important}
  .featured-section .course-thumb{aspect-ratio:2.15/1!important}
  .featured-section .course-body{min-height:0!important;padding:16px 58px 16px 16px!important}
  .process-grid{grid-template-columns:1fr!important;gap:18px!important}
  .process-step{grid-template-columns:44px 1fr!important}.process-num{width:44px!important;height:44px!important}
  .cta-v2-board{border-radius:14px!important;overflow:hidden!important}
  .cta-v2-main,.cta-v2-photo-card{min-height:240px!important}
  .cta-v2-feature{min-height:140px!important;padding:22px!important}
}

@media(max-width:480px){
  :root{--gutter:16px;--section-space:48px}
  .wrap{padding-inline:16px!important}
  .home-shell{width:calc(100% - 28px)!important}
  .page-hero{padding-top:36px!important;padding-bottom:34px!important}
  .page-hero h1{font-size:clamp(2.15rem,11.8vw,3rem)!important}
  .mobile-nav-actions{grid-template-columns:1fr!important}
  .catalog-toolbar{grid-template-columns:1fr!important}.result-count{justify-self:start!important}
  .category-row{grid-template-columns:46px minmax(0,1fr) auto!important;gap:10px!important}
  .hero-reference-v2 .home-hero-actions{grid-template-columns:1fr!important}
  .hero-reference-visual{min-height:295px!important}
  .hero-reference-photo{left:3%!important;right:-6%!important}
  .hero-circle-message{width:68px!important;height:68px!important;font-size:.35rem!important}
  .hero-impact-card{font-size:.56rem!important}
  .footer-main{grid-template-columns:1fr!important}
  .footer-col{padding:20px 0!important;border-left:0!important;border-top:1px solid #e7eeee!important}
  .footer-col:nth-of-type(3){border-left:0!important;padding-left:0!important}
  .footer-brandbox{padding-bottom:20px!important}
  .about-hero-visual{height:245px!important}.about-hero-circle{width:190px!important;height:190px!important}
  .cta-v2-main h2{font-size:2.15rem!important}
}
