/* TRG02R – Taxi Rạch Giá Homepage Repair
   Repairs the Hybrid homepage after the legacy Transport P48 stylesheet was removed.
   Keep this file after taxi-home-final.css. */
:root{--shell:1280px;--taxi-container:1280px}

/* Hard-lock the common visual rail to 1280px on desktop. */
body.txs-body .txs-shell,
body.txs-body .txs-vf-shell,
body.taxi-service-site .txs-shell,
body.taxi-service-site .txs-vf-shell,
.txm-home .txs-shell,
.txm-home .txm-hero-media{
  width:min(1280px,calc(100% - 32px))!important;
  max-width:1280px!important;
  margin-left:auto!important;
  margin-right:auto!important;
  box-sizing:border-box!important;
}

/* The Home-only blocks depend on these display rules. Without them SVGs expand and cards collapse. */
.txm-home .txm-about-faq{display:grid!important;grid-template-columns:minmax(0,1.05fr) minmax(380px,.95fr)!important;gap:26px!important;align-items:start!important}
.txm-home .txm-benefits{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;margin-top:20px!important}
.txm-home .txm-benefit{padding:14px!important;border:1px solid var(--txm-line)!important;border-radius:13px!important;background:#fff!important;min-width:0!important}
.txm-home .txm-benefit>span{display:grid!important;width:35px!important;height:35px!important;place-items:center!important;margin-bottom:9px!important;border-radius:11px!important;background:#eef7fd!important;color:#0871d8!important}
.txm-home .txm-benefit svg{display:block!important;width:20px!important;height:20px!important;max-width:20px!important;max-height:20px!important;fill:none!important;stroke:currentColor!important;stroke-width:2!important;stroke-linecap:round!important;stroke-linejoin:round!important}
.txm-home .txm-benefit strong{display:block!important;font-size:14px!important;color:#173d68!important}
.txm-home .txm-benefit small{display:block!important;margin-top:4px!important;color:var(--txm-muted)!important;font-size:11px!important;line-height:1.38!important}

/* FAQ must remain a card accordion rather than browser-default triangles/text. */
.txm-home .txm-faq-card{padding:0 0 0 22px!important;border-left:1px solid #d7e4ed!important;min-width:0!important}
.txm-home .txm-faq{display:grid!important;gap:8px!important;margin-top:14px!important}
.txm-home .txm-faq details{display:block!important;border:1px solid var(--txm-line)!important;border-radius:11px!important;background:#fff!important;overflow:hidden!important}
.txm-home .txm-faq summary{display:block!important;position:relative!important;padding:12px 40px 12px 14px!important;cursor:pointer!important;color:#274861!important;font-size:13px!important;font-weight:800!important;list-style:none!important}
.txm-home .txm-faq summary::-webkit-details-marker{display:none!important}
.txm-home .txm-faq summary::marker{content:""}
.txm-home .txm-faq summary:after{content:'+'!important;position:absolute!important;right:14px!important;top:50%!important;transform:translateY(-50%)!important;color:#0871d8!important;font-size:18px!important;font-weight:700!important}
.txm-home .txm-faq details[open] summary:after{content:'–'!important}
.txm-home .txm-faq details p{margin:0!important;padding:0 14px 13px!important;color:#5e7386!important;font-size:13px!important;line-height:1.52!important}

/* News restores the three-column compact card grid. */
.txm-home .txm-news-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important}
.txm-home .txm-news-card{overflow:hidden!important;border:1px solid var(--txm-line)!important;border-radius:14px!important;background:#fff!important;min-width:0!important}
.txm-home .txm-news-card>a{display:grid!important;grid-template-columns:128px minmax(0,1fr)!important;min-height:108px!important;color:var(--txm-ink)!important}
.txm-home .txm-news-card img{display:block!important;width:128px!important;height:100%!important;min-height:108px!important;object-fit:cover!important;background:#e9f0f4!important}
.txm-home .txm-news-copy{display:flex!important;flex-direction:column!important;justify-content:center!important;padding:13px 14px!important;min-width:0!important}

/* Prevent old generic SVG rules from ever expanding inline service icons. */
.txm-home :is(.txm-benefit,.txm-route-pin,.txm-service-icon,.txm-local-card-icon,.txm-driver-facts) svg{flex:none!important}

/* Keep section spacing compact and consistent with the approved 1280 layout. */
.txm-home .txm-about-section{padding-top:30px!important;padding-bottom:30px!important}
.txm-home .txm-news{padding-top:30px!important;padding-bottom:32px!important}

@media(max-width:820px){
  body.txs-body .txs-shell,body.txs-body .txs-vf-shell,body.taxi-service-site .txs-shell,body.taxi-service-site .txs-vf-shell,.txm-home .txs-shell,.txm-home .txm-hero-media{width:calc(100% - 24px)!important;max-width:none!important}
  .txm-home .txm-about-faq{grid-template-columns:1fr!important;gap:0!important}
  .txm-home .txm-faq-card{padding:22px 0 0!important;border-left:0!important;border-top:1px solid #d7e4ed!important;margin-top:22px!important}
  .txm-home .txm-news-grid{grid-template-columns:1fr!important}
  .txm-home .txm-news-card>a{grid-template-columns:150px minmax(0,1fr)!important}
  .txm-home .txm-news-card img{width:150px!important}
}
@media(max-width:560px){
  .txm-home .txm-benefits{grid-template-columns:1fr!important;gap:8px!important}
  .txm-home .txm-news-card>a{grid-template-columns:104px minmax(0,1fr)!important;min-height:102px!important}
  .txm-home .txm-news-card img{width:104px!important;min-height:102px!important}
  .txm-home .txm-about-section{padding-top:22px!important;padding-bottom:22px!important}
  .txm-home .txm-news{padding-top:22px!important;padding-bottom:24px!important}
}
