/* v507G — Useful Guide structure QA, visual consistency and image polish.
   Scope: guide hub + guide article pages + existing guide pages referenced from Useful Guide. */

body.useful-guide-page .guide-hero,
body.useful-article-page .guide-hero{
  padding:clamp(48px,6vw,86px) 0 !important;
}

body.useful-guide-page .guide-hero-grid,
body.useful-article-page .guide-hero-grid{
  display:grid !important;
  grid-template-columns:minmax(0,1.12fr) minmax(340px,.88fr) !important;
  gap:clamp(24px,3.2vw,48px) !important;
  align-items:center !important;
}

body.useful-guide-page .guide-hero-copy,
body.useful-article-page .guide-hero-copy{
  min-width:0 !important;
}

body.useful-guide-page .guide-hero h1,
body.useful-article-page .guide-hero h1{
  max-width:940px !important;
  margin:10px 0 14px !important;
  font-size:clamp(36px,3.6vw,52px) !important;
  line-height:1.06 !important;
  letter-spacing:-.045em !important;
}

body.useful-guide-page .guide-hero p,
body.useful-article-page .guide-hero p{
  max-width:820px !important;
  margin:0 0 18px !important;
  font-size:17px !important;
  line-height:1.62 !important;
}

.guide-visual-card{
  position:relative !important;
  overflow:hidden !important;
  border:1px solid rgba(219,234,254,.28) !important;
  border-radius:30px !important;
  min-height:330px !important;
  background:rgba(255,255,255,.12) !important;
  box-shadow:0 28px 80px rgba(2,6,23,.22) !important;
}

.guide-visual-card::after{
  content:"" !important;
  position:absolute !important;
  inset:0 !important;
  background:linear-gradient(180deg,rgba(2,6,23,0) 42%,rgba(2,6,23,.34) 100%) !important;
  pointer-events:none !important;
}

.guide-visual-card img{
  width:100% !important;
  height:100% !important;
  min-height:330px !important;
  display:block !important;
  object-fit:cover !important;
  object-position:center !important;
}

.guide-visual-caption{
  position:absolute !important;
  left:18px !important;
  right:18px !important;
  bottom:16px !important;
  z-index:2 !important;
  color:#fff !important;
  font-size:13px !important;
  font-weight:800 !important;
  line-height:1.35 !important;
  text-shadow:0 2px 12px rgba(2,6,23,.55) !important;
}

.guide-shell{
  max-width:1180px !important;
}

.guide-section-title{
  margin:44px 0 14px !important;
}

.guide-section-title h2{
  margin:0 0 8px !important;
  font-size:clamp(26px,3vw,34px) !important;
  line-height:1.15 !important;
}

.guide-section-title p{
  margin:0 !important;
  max-width:820px !important;
  color:#64748b !important;
}

.guide-grid{
  align-items:stretch !important;
}

.guide-card{
  overflow:hidden !important;
  padding:0 !important;
  min-height:310px !important;
}

.guide-card-media{
  height:138px !important;
  overflow:hidden !important;
  background:#eaf3ff !important;
  border-bottom:1px solid #e2e8f0 !important;
}

.guide-card-media img{
  width:100% !important;
  height:100% !important;
  display:block !important;
  object-fit:cover !important;
  object-position:center !important;
}

.guide-card-body{
  display:flex !important;
  flex-direction:column !important;
  flex:1 1 auto !important;
  padding:20px !important;
}

.guide-card-body a{
  margin-top:auto !important;
}

.guide-featured-card{
  position:relative !important;
  overflow:hidden !important;
}

.guide-featured-card::after{
  content:"" !important;
  position:absolute !important;
  right:-68px !important;
  bottom:-78px !important;
  width:220px !important;
  height:220px !important;
  border-radius:50% !important;
  background:radial-gradient(circle,rgba(59,130,246,.18),rgba(59,130,246,0) 68%) !important;
}

.guide-article{
  max-width:1040px !important;
}

.guide-article .article-card{
  padding:0 !important;
  overflow:hidden !important;
}

.guide-article-visual{
  height:280px !important;
  overflow:hidden !important;
  background:#eaf3ff !important;
  border-bottom:1px solid #dbe7f5 !important;
}

.guide-article-visual img{
  width:100% !important;
  height:100% !important;
  display:block !important;
  object-fit:cover !important;
  object-position:center !important;
}

.guide-article-content{
  padding:clamp(22px,4vw,40px) !important;
}

.guide-article-content h2:first-child{
  margin-top:0 !important;
}

.guide-backlink{
  display:inline-flex !important;
  align-items:center !important;
  gap:6px !important;
  margin:0 0 18px !important;
  color:#1d4ed8 !important;
  font-weight:900 !important;
  text-decoration:none !important;
}

.guide-related-strip{
  margin-top:28px !important;
  border:1px solid #dbe7f5 !important;
  border-radius:24px !important;
  background:#f8fbff !important;
  padding:20px !important;
}

.guide-related-strip h3{
  margin:0 0 12px !important;
}

.guide-related-strip .guide-related-links{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:10px !important;
}

.guide-related-strip a{
  display:inline-flex !important;
  border:1px solid #bfdbfe !important;
  background:#fff !important;
  color:#1d4ed8 !important;
  border-radius:999px !important;
  padding:9px 12px !important;
  font-weight:900 !important;
  text-decoration:none !important;
}

/* Existing pages referenced from Useful Guide should keep their original layout but get the same visual polish on mobile. */
body .visa-checker-hero .urgent-visual-card,
body .page-hero .landing-grid .ads-conversion-box{
  border-radius:28px !important;
}

@media(max-width:1100px){
  body.useful-guide-page .guide-hero-grid,
  body.useful-article-page .guide-hero-grid{
    grid-template-columns:1fr !important;
  }

  .guide-visual-card{
    min-height:260px !important;
  }

  .guide-visual-card img{
    min-height:260px !important;
  }
}

@media(max-width:980px){
  body.useful-guide-page .guide-hero h1,
  body.useful-article-page .guide-hero h1{
    font-size:clamp(32px,7vw,42px) !important;
    line-height:1.08 !important;
  }

  .guide-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .guide-card{
    min-height:0 !important;
  }

  .guide-card-media{
    height:124px !important;
  }

  .guide-article-visual{
    height:220px !important;
  }
}

@media(max-width:640px){
  body.useful-guide-page .guide-hero,
  body.useful-article-page .guide-hero{
    padding:36px 0 !important;
  }

  .guide-grid{
    grid-template-columns:1fr !important;
  }

  .guide-card-media{
    height:170px !important;
  }

  .guide-visual-card{
    min-height:220px !important;
    border-radius:22px !important;
  }

  .guide-visual-card img{
    min-height:220px !important;
  }

  .guide-article-visual{
    height:190px !important;
  }

  .guide-related-strip .guide-related-links{
    display:grid !important;
    grid-template-columns:1fr !important;
  }

  .guide-related-strip a{
    justify-content:center !important;
    border-radius:16px !important;
  }
}
