/* Goexam-IDP mobile hardening layer — loaded last */
html,body{width:100%;max-width:100%;overflow-x:hidden!important}
*,*:before,*:after{box-sizing:border-box}
img,video,svg,iframe{max-width:100%;height:auto}
body{min-width:0}
.wrap,.container,.pw,.tf-shell,.go-wrap,.nav-wrap{min-width:0}

/* Never allow flex/grid children to force the viewport wider */
.service-grid>*,.article-grid>*,.footer-grid>*,.hero-grid>*,.hero-slide>*,.dates .wrap>*,.about .wrap>*,
.tours-grid>*,.why-grid>*,.why-items>*,.pkg-grid>*,.info-grid>*,.gallery-grid>*,.faq-grid>*,
.methods-grid>*,.map-grid>*,.contact-grid>*,.channels-grid>*,.benefits-grid>*,.services-grid>*,
.cases-grid>*,.trust-grid>*,.stats-grid>*,.idp-grid>*,.van-grid>*,.pay-grid>*,.tf-grid>*,
.field-row>*,.form-row>*,.content-grid>*{min-width:0!important;max-width:100%!important}

/* Text must wrap by words, not become a vertical stack */
.service-card,.article-card,.tour-card,.benefit-card,.card,.tf-card,.exam-item,.exam-card{min-width:0!important;max-width:100%!important}
.service-card h3,.service-card p,.article-body h3,.article-body,.tf-card,.btn,.tf-btn,.go-register,
.register-mini,.hero-btns a,.hero-btns button{word-break:normal!important;overflow-wrap:break-word!important;white-space:normal!important}

/* Generic controls */
input,select,textarea,button{min-width:0;max-width:100%}
.table-wrap{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}

@media (max-width: 767px){
  body{font-size:14px}
  section{max-width:100%;overflow:hidden}
  .wrap,.container,.pw,.tf-shell,.go-wrap,.nav-wrap{width:calc(100% - 24px)!important;margin-inline:auto!important;padding-left:0!important;padding-right:0!important}

  /* Header */
  .go-top .go-wrap{width:calc(100% - 20px)!important;justify-content:center!important;gap:6px!important;padding-block:5px!important}
  .go-social{display:none!important}
  .go-contact{width:100%;justify-content:center!important;gap:5px 10px!important;flex-wrap:wrap!important;font-size:10.5px!important}
  .go-contact a{font-size:10.5px!important;white-space:nowrap!important}
  .go-head>.go-wrap{width:calc(100% - 20px)!important;min-height:62px!important;gap:8px!important}
  .go-brand{min-width:0!important;gap:7px!important}
  .go-mark{width:35px!important;height:35px!important;font-size:13px!important}
  .go-copy strong{font-size:15px!important}.go-copy small{display:none!important}
  .go-actions{margin-inline-start:auto!important;gap:6px!important}.go-register{padding:8px 9px!important}.go-register span{display:none!important}
  .go-menu{display:inline-flex!important}
  .go-mobile{padding:6px 14px 12px!important;max-height:70vh;overflow-y:auto}

  /* Home hero */
  .hero{padding-top:26px!important}
  .hero-slide,.hero-grid{display:grid!important;grid-template-columns:1fr!important;gap:22px!important}
  .hero-img{order:1!important;min-width:0!important}.hero-text{order:2!important;text-align:center!important}
  .hero-text h1{font-size:clamp(23px,7vw,30px)!important;line-height:1.45!important}
  .hero-city{font-size:21px!important}.hero-text p{font-size:13.5px!important;max-width:none!important}
  .hero-feats{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;justify-content:stretch!important}
  .hero-feats li{justify-content:flex-start!important;font-size:12px!important;text-align:right!important}
  .hero-btns{display:grid!important;grid-template-columns:1fr!important;width:100%!important;gap:10px!important}
  .hero-btns .btn,.hero-btns a{width:100%!important;min-height:46px!important;justify-content:center!important;text-align:center!important}

  /* Critical screenshot issues: service cards */
  .service-grid,.services-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;width:100%!important}
  .service-card{width:100%!important;padding:18px 10px!important;min-height:190px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important}
  .service-icon{width:50px!important;height:50px!important;font-size:20px!important;margin-bottom:12px!important;flex:0 0 auto!important}
  .service-card h3{width:100%!important;font-size:13.5px!important;line-height:1.8!important;margin:0 0 6px!important;text-align:center!important}
  .service-card p{width:100%!important;font-size:11.5px!important;line-height:1.85!important;text-align:center!important;margin:0!important}

  /* Critical screenshot issues: articles */
  .article-grid{display:grid!important;grid-template-columns:1fr!important;gap:14px!important;width:100%!important}
  .article-card{width:100%!important;display:grid!important;grid-template-columns:112px minmax(0,1fr)!important;min-height:128px!important;border-radius:14px!important}
  .article-thumb{height:100%!important;min-height:128px!important;font-size:14px!important;padding:10px!important;text-align:center!important}
  .article-body{padding:14px!important;min-width:0!important;display:flex!important;flex-direction:column!important;justify-content:center!important}
  .article-body h3{font-size:13.5px!important;line-height:1.85!important;min-height:0!important;margin-bottom:8px!important}
  .article-meta{font-size:10.5px!important;gap:8px!important;flex-wrap:wrap!important;justify-content:flex-start!important}
  .carousel-arrow{display:none!important}
  .articles-cta .btn{width:100%!important;justify-content:center!important}

  /* Sections/grids */
  .dates .wrap,.about .wrap,.why-grid,.map-grid,.contact-grid,.tf-grid,.content-grid{display:grid!important;grid-template-columns:1fr!important;gap:18px!important}
  .tours-grid,.pkg-grid,.packages-grid,.gallery-grid,.faq-grid,.info-grid,.channels-grid,.methods-grid,.cases-grid,.trust-grid,.pay-grid,.stats-grid,.idp-grid,.van-grid{grid-template-columns:1fr!important;gap:14px!important}
  .benefits-grid,.why-items,.features-grid{grid-template-columns:1fr!important;gap:12px!important}
  .about-feats{grid-template-columns:1fr!important;gap:10px!important}
  .tf-side{position:static!important}.tf-card{padding:18px!important}.tf-cta{display:grid!important;grid-template-columns:1fr!important}.tf-btn{width:100%!important;justify-content:center!important;text-align:center!important}

  /* Exam/date cards */
  .exam-item{display:grid!important;grid-template-columns:auto 1fr!important;gap:10px 12px!important;padding:14px!important;align-items:start!important}
  .exam-date-badge{grid-row:1 / span 2!important;min-width:66px!important;padding:8px 10px!important}
  .exam-mid{min-width:0!important}.exam-mid h4{font-size:14px!important}.exam-meta{gap:6px 10px!important;font-size:11px!important}
  .register-mini{grid-column:1/-1!important;width:100%!important;justify-content:center!important;min-height:42px!important}

  /* Cards/buttons should never collapse to vertical text */
  .btn,.tf-btn,.register-mini,.go-register,.refresh-dates,.newsletter-form button{line-height:1.5!important;letter-spacing:0!important;writing-mode:horizontal-tb!important;text-orientation:mixed!important}
  .btn:not(.icon-btn),.tf-btn{min-width:0!important}

  /* Footer */
  footer{overflow:hidden!important}.footer-grid{display:grid!important;grid-template-columns:1fr!important;gap:22px!important}
  .footer-col{width:100%!important;min-width:0!important}.footer-col ul{padding:0!important;margin:0!important}
  .newsletter-form{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;width:100%!important}
  .newsletter-form input,.newsletter-form button{width:100%!important;min-width:0!important}
  .footer-bottom{display:flex!important;flex-direction:column!important;align-items:center!important;text-align:center!important}

  /* Forms */
  .field-row,.form-row{display:grid!important;grid-template-columns:1fr!important;gap:12px!important}
  .bank-card{width:100%!important;max-width:300px!important;margin-inline:auto!important}

  /* headings/spacing */
  h2.section-title{font-size:22px!important;line-height:1.5!important}.section-head,.sh{margin-bottom:20px!important}
  .section-sub,.note{max-width:none!important}
}

@media (max-width: 390px){
  .service-grid,.services-grid{grid-template-columns:1fr!important}
  .service-card{min-height:0!important;padding:16px!important}
  .article-card{grid-template-columns:92px minmax(0,1fr)!important}
  .article-thumb{min-height:120px!important;font-size:12.5px!important}
  .hero-feats{grid-template-columns:1fr!important}
}
