/* AndJoy 1.1.6 — mobile-first refinements */
html,body{max-width:100%;overflow-x:hidden}
img{max-width:100%;height:auto}

/* Mobile nav for subpages (homepage keeps its existing menu). */
.aj-mobile-toggle{display:none;border:0;background:transparent;color:#112c56;font-size:26px;line-height:1;padding:8px 6px;cursor:pointer}

@media(max-width:780px){
  body{font-size:15px;line-height:1.6}
  .wrap{padding-left:18px!important;padding-right:18px!important}

  /* Header / navigation */
  .nav{min-height:68px!important;padding-top:8px!important;padding-bottom:8px!important;flex-wrap:wrap!important;gap:10px!important}
  .nav .brand{font-size:24px!important}
  .nav .brand small{font-size:8px!important;margin-top:4px!important}
  .aj-mobile-toggle{display:block;margin-left:auto}
  .nav>.btn{display:none!important}
  .nav>nav{display:none!important;width:100%!important;order:5!important;flex-direction:column!important;align-items:stretch!important;gap:0!important;overflow:visible!important;white-space:normal!important;padding:6px 0 10px!important;border-top:1px solid #e6ebf3}
  .nav.aj-mobile-open>nav{display:flex!important}
  .nav>nav a{padding:11px 4px!important;font-size:14px!important;border-bottom:1px solid #eef2f7}
  .nav>nav a:last-child{border-bottom:0}

  /* Homepage header */
  .header .nav{min-height:68px!important}
  .header .logo-caption,.header .logo i{display:none!important}
  .header .logo-mark{font-size:23px!important}
  .header .hamb{display:block!important;margin-left:auto}
  .header .mobile-menu.open{padding:10px 18px 18px!important;gap:0!important}
  .header .mobile-menu a{padding:10px 2px;border-bottom:1px solid #edf1f6;font-size:14px;font-weight:700}

  /* Homepage hero */
  .hero-inner{display:flex!important;flex-direction:column!important;align-items:stretch!important;min-height:0!important}
  .hero-copy{padding:40px 0 14px!important}
  .hero h1{font-size:clamp(36px,10.5vw,46px)!important;line-height:1.08!important;margin-bottom:18px!important}
  .hero p{font-size:15px!important;line-height:1.7!important;max-width:none!important}
  .actions{margin-top:22px!important;gap:10px!important}
  .actions .btn{min-height:48px!important;padding:0 17px!important;font-size:13px!important}
  .hero-visual{height:330px!important;width:100%!important;margin-top:4px!important;align-self:auto!important}
  .hero-photo{inset:8px 0 0 0!important;border-radius:48px 48px 0 0!important}
  .hero-photo img{object-fit:cover!important;object-position:center 18%!important}
  .hero-photo:after{background:linear-gradient(180deg,transparent 62%,rgba(17,44,86,.10))!important}
  .hero-stamp{width:84px!important;height:84px!important;right:8px!important;top:16px!important;font-size:9px!important;transform:rotate(8deg)!important}
  .float-card{left:12px!important;right:12px!important;bottom:12px!important;padding:11px 13px!important;gap:9px!important;border-radius:10px!important}
  .float-card .symbol{font-size:20px!important;padding:6px!important}
  .float-card b{font-size:13px!important}
  .float-card small{font-size:10.5px!important}

  /* Homepage sections */
  .trust-inner{grid-template-columns:1fr 1fr!important;gap:14px!important;padding-top:22px!important;padding-bottom:22px!important}
  .trust-item{gap:9px!important;align-items:flex-start!important}
  .trust-icon{width:36px!important;height:36px!important;font-size:17px!important;flex:0 0 36px!important}
  .trust-item strong{font-size:12.5px!important;line-height:1.3!important}
  .trust-item small{font-size:10.5px!important;line-height:1.35!important;display:block;margin-top:3px}
  .section{padding:54px 0!important}
  .section-head{margin-bottom:26px!important}
  .section-head h2,.method-copy h2,.locations h2{font-size:clamp(28px,8vw,36px)!important}
  .courses{grid-template-columns:1fr!important;gap:14px!important}
  .course-art{height:145px!important}
  .course-body{padding:20px!important}
  .method-grid,.exam-grid{grid-template-columns:1fr!important;gap:30px!important}
  .photo-block{height:300px!important;margin-bottom:12px!important}
  .photo-block .image{width:100%!important;border-radius:12px 76px 12px 12px!important}
  .photo-block img{object-position:center 34%!important}
  .method-note{right:8px!important;bottom:-18px!important;padding:14px 16px!important;font-size:13px!important;max-width:190px!important}
  .exam{padding-top:58px!important;padding-bottom:58px!important}
  .exam:before{font-size:190px!important;top:-35px!important;right:-10px!important}
  .exam-panel{padding:24px!important}
  .exam-panel .big{font-size:46px!important}
  .location-grid{grid-template-columns:1fr 1fr!important;gap:10px!important}
  .location{padding:18px!important}
  .cta{padding:55px 0!important}
  .cta-flex{display:block!important}
  .cta h2{font-size:clamp(28px,8vw,36px)!important}
  .footer{padding:38px 0 20px!important}
  .footer-top,.footer-bottom{display:block!important}
  .footer-links{margin-top:24px!important;gap:14px!important;line-height:2!important}
  .footer-bottom span{display:block;margin-top:5px}

  /* Assistant block */
  .aj-ai-integrated{padding:16px 10px 20px!important}
  .aj-ai-integrated-card{padding:5px!important;border-radius:15px!important;box-shadow:0 8px 24px rgba(17,44,86,.06)!important}
  .aj-ai-integrated #andjoy-ai{max-width:none!important}

  /* Generic subpages */
  .subpage-hero,.matura-hero{padding:42px 0 48px!important}
  .subpage-hero h1,.matura-hero h1{font-size:clamp(34px,9.5vw,45px)!important;line-height:1.1!important}
  .subpage-hero p,.matura-hero p{font-size:15px!important;line-height:1.7!important}
  .subpage-hero .crumb,.matura-hero .crumb{margin-bottom:12px!important}
  .pill{font-size:9.5px!important;letter-spacing:.12em!important;line-height:1.5!important}
  .section{padding:48px 0!important}
  .section h2{font-size:clamp(27px,7.5vw,35px)!important}
  .lead{font-size:14.5px!important}
  .grid,.two{grid-template-columns:1fr!important;gap:14px!important}
  .card{padding:21px!important;min-height:0!important;border-radius:11px!important}
  .card h3{margin-top:12px!important;font-size:20px!important}
  .card .emoji{font-size:35px!important}
  .aj-method-visual{margin:8px 0 14px!important}
  .aj-method-visual img{height:145px!important;padding:10px!important}
  .aj-method-visual--bearton img{height:155px!important}
  .levels{grid-template-columns:1fr 1fr!important;gap:10px!important}
  .level{padding:19px!important}
  .panel{padding:23px!important;border-radius:11px!important}
  .cta{padding:52px 0!important}
  .cta h2{font-size:30px!important}
  .foot{display:block!important;text-align:center!important}
  .foot span{display:block;margin:4px 0}
  .table-wrap{margin-left:-2px;margin-right:-2px;-webkit-overflow-scrolling:touch}
  table{min-width:680px}

  /* Gallery */
  .aj-gallery{padding:50px 0!important}
  .aj-gallery-grid{grid-template-columns:1fr!important;gap:12px!important;margin-top:22px!important}
  .aj-gallery-card img{height:230px!important}
  .aj-gallery-card figcaption{padding:12px 14px!important}

  /* Advantages */
  .aj-advantages-head{gap:14px!important}
  .aj-advantages-grid{grid-template-columns:1fr!important;gap:12px!important}
  .aj-advantage{padding:21px!important;border-radius:12px!important}
  .aj-advantage-top{margin-bottom:14px!important}
  .aj-advantage-symbol{width:36px!important;height:36px!important;font-size:20px!important}
  .aj-advantages-banner{padding:22px 18px!important;gap:20px!important}
  .aj-advantages-banner .aj-banner-actions{display:grid!important;grid-template-columns:1fr!important;width:100%!important}
  .aj-advantages-banner .btn{width:100%!important}
}

@media(max-width:480px){
  .wrap{padding-left:15px!important;padding-right:15px!important}
  .hero-copy{padding-top:32px!important}
  .hero h1{font-size:35px!important}
  .hero-visual{height:295px!important}
  .hero-stamp{display:none!important}
  .float-card{left:8px!important;right:8px!important}
  .trust-inner{grid-template-columns:1fr!important;gap:11px!important}
  .trust-item{align-items:center!important}
  .location-grid{grid-template-columns:1fr!important}
  .levels{grid-template-columns:1fr!important}
  .actions{display:grid!important;grid-template-columns:1fr!important}
  .actions .btn{width:100%!important}
  .section{padding:44px 0!important}
  .photo-block{height:265px!important}
  .aj-gallery-card img{height:205px!important}
}
