/*
Theme Name: MTG V7 Long Xuyen Style
Author: OpenAI
Description: Giao diện portal Công giáo lấy cảm hứng từ giaophanlongxuyen.org
Version: 7.0
Requires at least: 5.8
Requires PHP: 7.4
Text Domain: mtg-v7-longxuyen-style
*/
:root{
  --blue:#0c88c6;
  --blue-dark:#066b9e;
  --orange:#f39a21;
  --red:#ea3d2f;
  --border:#cfd8df;
  --bg:#e6eaee;
  --card:#ffffff;
  --muted:#5f7383;
  --text:#173042;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);font-family:Arial,Helvetica,sans-serif;color:var(--text)}
a{text-decoration:none;color:#0a5d8d}
img{max-width:100%;display:block;height:auto}
.container{width:min(1120px,calc(100% - 18px));margin:0 auto}
.site-top{background:#fff;border-top:2px solid var(--blue)}
.site-top .container{display:flex;justify-content:space-between;align-items:center;padding:8px 0}
.branding{display:flex;align-items:center;gap:10px}
.logo-round{width:42px;height:42px;border-radius:50%;background:linear-gradient(135deg,var(--blue-dark),var(--blue));display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700}
.site-title{font-size:18px;font-weight:700;margin:0;color:#0a5d8d}
.site-desc{margin:2px 0 0;font-size:12px;color:#73889a}
.top-date{font-size:11px;color:#7d8f9e}
.main-nav{background:var(--blue)}
.main-nav .container{display:flex;align-items:center;justify-content:space-between}
.main-nav ul{list-style:none;display:flex;flex-wrap:wrap;margin:0;padding:0}
.main-nav li{position:relative}
.main-nav a{display:block;color:#fff;padding:9px 10px;font-size:12px;font-weight:700}
.main-nav a:hover,.main-nav .current-menu-item>a,.main-nav .current_page_item>a{background:var(--blue-dark)}
.main-nav .search-icon{color:#fff;padding-right:10px;font-size:14px}
.top-featured{display:grid;grid-template-columns:2.1fr 1fr 1fr;gap:8px;margin:8px 0 10px}
.card{background:var(--card);border:1px solid var(--border)}
.slider-card{overflow:hidden}
.slider-image{height:340px;background:linear-gradient(135deg,#7fb3cf,#dceef8);display:flex;align-items:center;justify-content:center;color:#fff;font-size:48px}
.slider-image img{width:100%;height:340px;object-fit:cover}
.slider-caption{padding:8px 10px;background:#d9e6f0}
.slider-caption h2{margin:0 0 4px;font-size:14px;color:#111;line-height:1.35}
.slider-caption p{margin:0;font-size:12px;line-height:1.5}
.section-title{
  display:flex;align-items:center;gap:8px;
  padding:5px 8px;border-bottom:1px solid var(--border);
  background:#fafcfd;font-size:12px;font-weight:700;color:var(--red);text-transform:uppercase
}
.section-title::before{content:"✚";color:var(--orange)}
.news-list{padding:8px}
.news-item{display:grid;grid-template-columns:90px 1fr;gap:8px;padding-bottom:8px;margin-bottom:8px;border-bottom:1px dashed var(--border)}
.news-item:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}
.news-thumb{background:linear-gradient(135deg,#7fb3cf,#dceef8);width:90px;height:68px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:22px}
.news-thumb img{width:90px;height:68px;object-fit:cover}
.news-item h3{margin:0 0 4px;font-size:12px;line-height:1.35}
.news-item p{margin:0;font-size:11px;color:var(--muted);line-height:1.45}
.right-list{padding:8px}
.right-list li{font-size:12px;line-height:1.45;margin-bottom:7px}
.banner-stack{padding:8px;display:grid;gap:8px}
.banner-box{height:48px;background:linear-gradient(135deg,#cec2f1,#f1e7ff);display:flex;align-items:center;justify-content:center;color:#7a1e2f;font-weight:700;text-align:center;font-size:12px;border:1px solid var(--border)}
.banner-box.dark{background:linear-gradient(135deg,#281400,#563617);color:#fff}
.banner-box.black{background:linear-gradient(135deg,#0f0f14,#282b3d);color:#fff}
.portal-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.portal-box{background:#fff;border:1px solid var(--border)}
.portal-box .section-title{padding:4px 7px;font-size:11px}
.portal-box .box-body{padding:7px}
.portal-feature{margin-bottom:8px}
.portal-feature .feature-thumb{height:120px;background:linear-gradient(135deg,#7fb3cf,#dceef8);display:flex;align-items:center;justify-content:center;color:#fff;font-size:28px}
.portal-feature .feature-thumb img{width:100%;height:120px;object-fit:cover}
.portal-feature h3{margin:6px 0 4px;font-size:12px;line-height:1.35}
.small-links{list-style:none;margin:0;padding:0}
.small-links li{font-size:11px;line-height:1.45;padding:5px 0;border-bottom:1px dashed var(--border)}
.small-links li:last-child{border-bottom:none}
.bottom-wrap{display:grid;grid-template-columns:2.8fr 1fr;gap:8px;margin-top:8px}
.latest-box .box-body{padding:7px}
.latest-item{display:grid;grid-template-columns:74px 1fr;gap:8px;padding:7px 0;border-bottom:1px dashed var(--border)}
.latest-item:last-child{border-bottom:none}
.latest-thumb{width:74px;height:54px;background:linear-gradient(135deg,#7fb3cf,#dceef8);display:flex;align-items:center;justify-content:center;color:#fff}
.latest-thumb img{width:74px;height:54px;object-fit:cover}
.latest-item h3{margin:0 0 4px;font-size:12px;line-height:1.35}
.latest-item p{margin:0;font-size:11px;color:var(--muted)}
.sidebar-stack{display:grid;gap:8px}
.widget-box{background:#fff;border:1px solid var(--border)}
.widget-box .inner{padding:8px}
.media-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.media-tile{position:relative;background:linear-gradient(135deg,#7fb3cf,#dceef8);min-height:54px;border:1px solid var(--border)}
.media-tile img{width:100%;height:54px;object-fit:cover}
.media-tile span{position:absolute;left:3px;right:3px;bottom:3px;background:rgba(0,0,0,.55);color:#fff;font-size:9px;padding:2px 3px}
.video-frame{position:relative;padding-top:56.25%;background:#1788bf}
.video-frame iframe,.video-fallback{position:absolute;inset:0;width:100%;height:100%;border:0}
.video-fallback{display:flex;align-items:center;justify-content:center;color:#fff;font-size:24px}
.follow-list,.tiny-list{list-style:none;margin:0;padding:0}
.follow-list li,.tiny-list li{font-size:11px;padding:4px 0;border-bottom:1px dashed var(--border)}
.follow-list li:last-child,.tiny-list li:last-child{border-bottom:none}
.search-form{display:flex;gap:6px}
.search-field{flex:1;padding:6px;border:1px solid var(--border);font-size:11px}
.search-submit{padding:6px 10px;border:0;background:var(--blue);color:#fff;font-size:11px}
.footer-links{margin-top:8px}
.footer-links .container{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
.footer-link{background:#fff;border:1px solid var(--border);text-align:center;padding:8px 4px;font-size:10px;color:#315166}
.site-footer{background:var(--blue);margin-top:8px;color:#fff}
.site-footer .container{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:10px;padding:10px 0}
.site-footer h4{margin:0 0 6px;font-size:12px}
.site-footer p,.site-footer a{margin:0 0 4px;font-size:10px;color:#e7f7ff;line-height:1.5}
.page-layout,.single-layout{display:grid;grid-template-columns:2.8fr 1fr;gap:8px;margin-top:8px}
.content-card{background:#fff;border:1px solid var(--border);padding:10px}
.entry-title{margin:0 0 8px;font-size:22px;color:#0a5d8d}
.post-meta{font-size:11px;color:#6f8395;margin-bottom:8px}
.share-bar{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.share-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:4px;color:#fff;font-size:11px;font-weight:700}
.share-btn.facebook{background:#1877f2}
.share-btn.x{background:#111}
.share-btn.telegram{background:#2AABEE}
.share-btn.whatsapp{background:#25D366}
.share-btn.email{background:#7a7f87}
@media (max-width:1024px){
  .top-featured,.bottom-wrap,.page-layout,.single-layout{grid-template-columns:1fr}
  .portal-grid{grid-template-columns:1fr 1fr}
}
@media (max-width:680px){
  .portal-grid,.footer-links .container,.site-footer .container,.top-featured{grid-template-columns:1fr}
  .main-nav .container{display:block}
  .main-nav ul{display:block}
}

/* V7.1 tuned from user's screenshot */
body{background:#d9dde2}
.container{width:min(1040px,calc(100% - 12px))}
.site-top .container{padding:6px 0}
.logo-round{width:36px;height:36px;font-size:16px}
.site-title{font-size:16px}
.site-desc{display:none}
.top-date{font-size:10px}
.main-nav a{padding:7px 8px;font-size:10px}
.top-featured{grid-template-columns:2.2fr 1.05fr .95fr;gap:6px;margin:6px 0 8px}
.slider-image{height:240px}
.slider-image img{height:240px}
.slider-caption{padding:6px 8px}
.slider-caption h2{font-size:13px}
.slider-caption p{font-size:11px}
.section-title{padding:4px 6px;font-size:10px}
.news-list,.right-list,.banner-stack,.portal-box .box-body,.widget-box .inner{padding:6px}
.news-item{grid-template-columns:74px 1fr;gap:6px;padding-bottom:6px;margin-bottom:6px}
.news-thumb,.news-thumb img{width:74px;height:54px}
.news-item h3{font-size:11px}
.news-item p{font-size:10px}
.banner-stack{gap:6px}
.banner-box{height:42px;font-size:11px}
.portal-grid{gap:6px}
.portal-box .section-title{font-size:10px;padding:4px 6px}
.portal-feature .feature-thumb{height:96px}
.portal-feature .feature-thumb img{height:96px}
.portal-feature h3{font-size:11px}
.small-links li{font-size:10px;padding:4px 0}
.bottom-wrap{grid-template-columns:2.85fr .92fr;gap:6px;margin-top:6px}
.latest-item{grid-template-columns:64px 1fr;gap:6px;padding:6px 0}
.latest-thumb,.latest-thumb img{width:64px;height:46px}
.latest-item h3{font-size:11px}
.latest-item p{font-size:10px}
.sidebar-stack{gap:6px}
.widget-box .section-title{font-size:10px}
.media-grid{gap:5px}
.media-tile{min-height:48px}
.media-tile img{height:48px}
.media-tile span{font-size:8px}
.video-frame{padding-top:52%}
.follow-list li,.tiny-list li{font-size:10px;padding:3px 0}
.search-field,.search-submit{font-size:10px;padding:5px}
.footer-links{margin-top:6px}
.footer-links .container{gap:5px}
.footer-link{font-size:9px;padding:7px 3px}
.site-footer{margin-top:6px}
.site-footer .container{padding:8px 0}
.site-footer h4{font-size:11px}
.site-footer p,.site-footer a{font-size:9px}
.portal-feature.empty-state{
  border:1px dashed #c9d3db;
  background:#eef4f8;
  padding:10px 8px;
  text-align:center;
}
.portal-feature.empty-state .feature-thumb{
  height:86px;
  background:linear-gradient(135deg,#b6d5e7,#dcebf4);
}
.portal-feature.empty-state h3{
  margin:8px 0 0;
  color:#587286;
}
.news-item.empty-news .news-thumb,
.latest-item.empty-latest .latest-thumb{
  background:linear-gradient(135deg,#b6d5e7,#dcebf4);
}
@media (max-width:1024px){
  .top-featured,.bottom-wrap{grid-template-columns:1fr}
  .portal-grid{grid-template-columns:1fr 1fr}
}
@media (max-width:700px){
  .portal-grid,.footer-links .container,.site-footer .container,.top-featured{grid-template-columns:1fr}
}


/* V7.2 ultra-close tuning */
body{background:#d7dce1}
.container{width:min(1015px,calc(100% - 10px))}
.site-top{border-top:1px solid #0a79b3}
.site-top .container{padding:4px 0}
.logo-round{width:32px;height:32px;font-size:14px}
.site-title{font-size:14px;letter-spacing:0}
.top-date{font-size:9px}
.main-nav{box-shadow:inset 0 -1px 0 rgba(255,255,255,.1)}
.main-nav a{padding:6px 7px;font-size:9px}
.main-nav .search-icon{font-size:11px;padding-right:6px}
.top-featured{grid-template-columns:2.28fr 1fr .94fr;gap:5px;margin:5px 0 6px}
.slider-card{border-color:#c7d1d8}
.slider-image{height:208px}
.slider-image img{height:208px}
.slider-caption{padding:5px 7px;background:#d8e4ec}
.slider-caption h2{font-size:12px;margin:0 0 3px}
.slider-caption p{font-size:10px;line-height:1.4}
.section-title{padding:3px 5px;font-size:9px}
.news-list,.right-list,.banner-stack,.portal-box .box-body,.widget-box .inner{padding:5px}
.news-item{grid-template-columns:66px 1fr;gap:5px;padding-bottom:5px;margin-bottom:5px}
.news-thumb,.news-thumb img{width:66px;height:48px}
.news-item h3{font-size:10px;line-height:1.3}
.news-item p{font-size:9px;line-height:1.38}
.tiny-list li,.follow-list li{font-size:9px;padding:3px 0}
.banner-stack{gap:5px}
.banner-box{height:38px;font-size:10px}
.portal-grid{gap:5px}
.portal-box .section-title{font-size:9px;padding:3px 5px}
.portal-feature{margin-bottom:5px}
.portal-feature .feature-thumb{height:86px}
.portal-feature .feature-thumb img{height:86px}
.portal-feature h3{font-size:10px;line-height:1.3;margin:5px 0 3px}
.small-links li{font-size:9px;line-height:1.38;padding:3px 0}
.bottom-wrap{grid-template-columns:2.95fr .88fr;gap:5px;margin-top:5px}
.latest-item{grid-template-columns:58px 1fr;gap:5px;padding:5px 0}
.latest-thumb,.latest-thumb img{width:58px;height:42px}
.latest-item h3{font-size:10px;line-height:1.3}
.latest-item p{font-size:9px;line-height:1.35}
.sidebar-stack{gap:5px}
.widget-box .section-title{font-size:9px}
.media-grid{gap:4px}
.media-tile{min-height:42px}
.media-tile img{height:42px}
.media-tile span{font-size:7px;padding:1px 2px}
.video-frame{padding-top:50%}
.search-field,.search-submit{font-size:9px;padding:4px}
.footer-links{margin-top:5px}
.footer-links .container{gap:4px}
.footer-link{font-size:8px;padding:6px 2px}
.site-footer{margin-top:5px}
.site-footer .container{padding:7px 0;gap:7px}
.site-footer h4{font-size:10px}
.site-footer p,.site-footer a{font-size:8px;line-height:1.45}
.portal-feature.empty-state{padding:8px 6px}
.portal-feature.empty-state .feature-thumb{height:74px}
.portal-feature.empty-state h3{font-size:9px}
.widget-box,.portal-box,.card,.footer-link,.content-card{box-shadow:none}
.widget-box,.portal-box,.card,.footer-link,.content-card,.media-tile,.banner-box{border-color:#c7d1d8}
@media (max-width:1024px){
  .top-featured,.bottom-wrap{grid-template-columns:1fr}
  .portal-grid{grid-template-columns:1fr 1fr}
}
@media (max-width:700px){
  .portal-grid,.footer-links .container,.site-footer .container,.top-featured{grid-template-columns:1fr}
}


/* V7.3 demo data + visible youtube cards */
.youtube-thumb{
  position:relative;
  display:block;
  width:100%;
  height:100%;
}
.youtube-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.youtube-thumb .play{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:24px;
  text-shadow:0 2px 8px rgba(0,0,0,.35);
}
.video-title-mini{
  margin-top:5px;
  font-size:9px;
  line-height:1.35;
}


/* V7.4 autoplay slider + richer right banners */
.slider-shell{
  position:relative;
}
.slider-track{
  position:relative;
  overflow:hidden;
}
.slide-item{
  display:none;
}
.slide-item.active{
  display:block;
}
.slider-dots{
  position:absolute;
  left:0; right:0; bottom:10px;
  display:flex;
  justify-content:center;
  gap:6px;
  z-index:5;
}
.slider-dot{
  width:8px;height:8px;border-radius:50%;
  background:rgba(255,255,255,.55);
  border:1px solid rgba(255,255,255,.7);
  cursor:pointer;
}
.slider-dot.active{
  background:#fff;
}
.banner-box.purple{background:linear-gradient(135deg,#e7d9ff,#f7f0ff);color:#7a1e2f}
.banner-box.maroon{background:linear-gradient(135deg,#5b2b10,#2f1204);color:#fff}
.banner-box.navy{background:linear-gradient(135deg,#0a1630,#1d355f);color:#fff}
.banner-box.red{background:linear-gradient(135deg,#e64b3c,#b11d17);color:#fff}
.banner-box.gold{background:linear-gradient(135deg,#f7d97f,#f0b84a);color:#613d00}
.banner-list{
  display:grid;
  gap:6px;
}


/* V7.4.1 layout fix */
.container{
  width:min(1120px, calc(100% - 18px)) !important;
  max-width:1120px !important;
  margin:0 auto !important;
}
.top-featured{
  display:grid !important;
  grid-template-columns:2fr 1fr 1fr !important;
  gap:8px !important;
  align-items:start !important;
}
.top-featured > .card{
  min-width:0 !important;
  width:100% !important;
}
.slider-card{
  width:100% !important;
  overflow:hidden !important;
}
.slider-track,.slide-item{
  width:100% !important;
}
.slider-image{
  height:320px !important;
}
.slider-image img{
  width:100% !important;
  height:320px !important;
  object-fit:cover !important;
}
.portal-grid{
  display:grid !important;
  grid-template-columns:repeat(4, 1fr) !important;
  gap:8px !important;
  align-items:start !important;
}
.portal-box,
.widget-box,
.latest-box,
.card{
  min-width:0 !important;
}
.bottom-wrap{
  display:grid !important;
  grid-template-columns:2.7fr 1fr !important;
  gap:8px !important;
  align-items:start !important;
}
.sidebar-stack{
  display:grid !important;
  gap:8px !important;
}
.news-list,.right-list,.banner-stack,.portal-box .box-body,.widget-box .inner{
  padding:8px !important;
}
.news-item{
  grid-template-columns:90px 1fr !important;
}
.news-thumb,.news-thumb img{
  width:90px !important;
  height:68px !important;
}
.portal-feature .feature-thumb{
  height:120px !important;
}
.portal-feature .feature-thumb img{
  height:120px !important;
}
.latest-item{
  grid-template-columns:74px 1fr !important;
}
.latest-thumb,.latest-thumb img{
  width:74px !important;
  height:54px !important;
}
.media-grid{
  grid-template-columns:1fr 1fr !important;
}
.media-tile img{
  width:100% !important;
  height:54px !important;
  object-fit:cover !important;
}
.video-frame{
  padding-top:56.25% !important;
}
@media (max-width: 1024px){
  .top-featured{
    grid-template-columns:1fr !important;
  }
  .portal-grid{
    grid-template-columns:1fr 1fr !important;
  }
  .bottom-wrap{
    grid-template-columns:1fr !important;
  }
}
@media (max-width: 680px){
  .portal-grid{
    grid-template-columns:1fr !important;
  }
}

/* V7.5 media sidebar */
.media-grid{
display:grid;
grid-template-columns:1fr 1fr;
gap:6px;
}
.media-tile img{
width:100%;
height:70px;
object-fit:cover;
}


/* V7.6 enhanced slider + gallery modal + media pages */
.slider-shell{position:relative}
.slider-arrow{
  position:absolute;top:50%;transform:translateY(-50%);
  width:30px;height:30px;border-radius:50%;
  background:rgba(0,0,0,.35);color:#fff;border:0;cursor:pointer;z-index:6
}
.slider-arrow.prev{left:8px}
.slider-arrow.next{right:8px}
.slider-arrow:hover{background:rgba(0,0,0,.55)}
.mega-strip{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:6px;
  margin:6px 0;
}
.mega-pill{
  display:block;background:#fff;border:1px solid var(--border);
  padding:7px 6px;font-size:10px;font-weight:700;text-align:center;color:#355368
}
.gallery-modal{
  position:fixed;inset:0;background:rgba(0,0,0,.82);
  display:none;align-items:center;justify-content:center;z-index:9999;padding:20px
}
.gallery-modal.open{display:flex}
.gallery-modal img{
  max-width:min(92vw,1200px);max-height:86vh;border:4px solid #fff;background:#fff
}
.gallery-close{
  position:absolute;top:12px;right:16px;background:#fff;border:0;
  width:34px;height:34px;border-radius:50%;cursor:pointer;font-weight:700
}
.album-grid-page{
  display:grid;grid-template-columns:repeat(3,1fr);gap:10px
}
.album-card{
  background:#fff;border:1px solid var(--border);padding:8px
}
.album-card img{width:100%;height:180px;object-fit:cover}
.album-card h3{font-size:12px;line-height:1.35;margin:8px 0 4px}
.video-grid-page{
  display:grid;grid-template-columns:repeat(2,1fr);gap:10px
}
.video-card-page{
  background:#fff;border:1px solid var(--border);padding:8px
}
.video-card-page .video-frame{margin-bottom:8px}
@media (max-width:900px){
  .mega-strip,.album-grid-page,.video-grid-page{grid-template-columns:1fr 1fr}
}
@media (max-width:680px){
  .mega-strip,.album-grid-page,.video-grid-page{grid-template-columns:1fr}
}


/* V7.7 layout fix for video/archive pages */
main.container{
  overflow:hidden;
}
.page-layout,
.single-layout,
.bottom-wrap{
  align-items:start !important;
}
.content-card,
.portal-box,
.widget-box,
.card,
.latest-box{
  overflow:hidden;
}
.video-grid-page,
.album-grid-page{
  display:grid !important;
  gap:10px !important;
  align-items:start !important;
}
.video-grid-page{
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
}
.album-grid-page{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
}
.video-card-page,
.album-card{
  min-width:0 !important;
  width:100% !important;
  box-sizing:border-box !important;
  overflow:hidden !important;
}
.video-card-page .video-frame{
  width:100% !important;
  max-width:100% !important;
}
.video-card-page .youtube-thumb img,
.album-card img{
  width:100% !important;
  display:block !important;
}
.video-card-page h3,
.album-card h3{
  margin:8px 0 4px !important;
  font-size:12px !important;
  line-height:1.35 !important;
}
.video-card-page p,
.album-card p{
  margin:0 !important;
  font-size:11px !important;
  line-height:1.5 !important;
}
@media (max-width:900px){
  .video-grid-page{grid-template-columns:1fr !important;}
  .album-grid-page{grid-template-columns:1fr 1fr !important;}
}
@media (max-width:680px){
  .album-grid-page{grid-template-columns:1fr !important;}
}


/* V7.8 media blocks like Long Xuyen */
.media-feature-box .section-title,
.video-feature-box .section-title{
  border-bottom:1px solid var(--border);
}
.video-feature-large{
  margin-bottom:8px;
}
.video-feature-large .youtube-thumb{
  display:block;
  position:relative;
  border:1px solid var(--border);
  background:#000;
}
.video-feature-large .youtube-thumb img{
  width:100%;
  height:128px;
  object-fit:cover;
  display:block;
}
.video-feature-large .youtube-thumb .play{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:28px;
  text-shadow:0 2px 10px rgba(0,0,0,.45);
}
.video-feature-large .video-title-mini{
  margin-top:6px;
  font-size:10px;
  line-height:1.4;
}
.video-thumb-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:6px;
}
.video-thumb-card{
  background:#fff;
}
.video-thumb-card .youtube-thumb{
  display:block;
  position:relative;
  border:1px solid var(--border);
  background:#000;
}
.video-thumb-card .youtube-thumb img{
  width:100%;
  height:62px;
  object-fit:cover;
  display:block;
}
.video-thumb-card .youtube-thumb .play{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:18px;
  text-shadow:0 2px 8px rgba(0,0,0,.45);
}
.video-thumb-card .mini-title{
  font-size:8px;
  line-height:1.35;
  margin-top:4px;
  color:#2f4454;
}
.photo-thumb-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:6px;
}
.photo-thumb-card{
  background:#fff;
}
.photo-thumb-card a{
  display:block;
  border:1px solid var(--border);
}
.photo-thumb-card img{
  width:100%;
  height:62px;
  object-fit:cover;
  display:block;
}
.photo-thumb-card .mini-title{
  font-size:8px;
  line-height:1.35;
  margin-top:4px;
  color:#2f4454;
}
@media (max-width:700px){
  .video-thumb-grid,
  .photo-thumb-grid{
    grid-template-columns:repeat(2,1fr);
  }
}


/* V8.9 banner sidebar with real background images */
.banner-box.image-banner{
  position:relative;
  overflow:hidden;
  background-size:cover !important;
  background-position:center !important;
  min-height:58px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.banner-box.image-banner::before{
  content:"";
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.28);
}
.banner-box.image-banner span{
  position:relative;
  z-index:2;
  color:#fff;
  text-shadow:0 2px 8px rgba(0,0,0,.45);
}


/* V9.1 Long Xuyen premium sidebar banners */
.banner-stack.banner-list{
  gap:8px !important;
}
.banner-box{
  position:relative;
  min-height:64px;
  border-radius:6px;
  overflow:hidden;
  border:1px solid rgba(0,0,0,.08);
  box-shadow:0 6px 18px rgba(0,0,0,.10);
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.banner-box:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(0,0,0,.16);
  filter:brightness(1.03);
}
.banner-box::after{
  content:"✚";
  position:absolute;
  left:10px;
  top:8px;
  z-index:3;
  width:18px;
  height:18px;
  line-height:18px;
  border-radius:50%;
  text-align:center;
  font-size:10px;
  color:#fff;
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.28);
  backdrop-filter:blur(2px);
}
.banner-box span{
  position:relative;
  z-index:2;
  display:block;
  width:100%;
  padding:22px 12px 12px 12px;
  text-align:center;
  font-weight:700;
  letter-spacing:.1px;
}
.banner-box.purple{
  background:linear-gradient(135deg,#efe4ff 0%, #d9c3ff 100%);
  color:#6f2142;
}
.banner-box.maroon{
  background:linear-gradient(135deg,#5d2506 0%, #2d1204 100%);
  color:#fff;
}
.banner-box.navy{
  background:linear-gradient(135deg,#082046 0%, #163a73 100%);
  color:#fff;
}
.banner-box.red{
  background:linear-gradient(135deg,#ef4e3d 0%, #bc1711 100%);
  color:#fff;
}
.banner-box.gold{
  background:linear-gradient(135deg,#f6dc87 0%, #e8b94a 100%);
  color:#614000;
}
.banner-box.image-banner{
  background-size:cover !important;
  background-position:center !important;
}
.banner-box.image-banner::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.38));
  z-index:1;
}
.banner-box.image-banner::after{
  content:"✚";
}
.banner-box.image-banner span{
  color:#fff !important;
  text-shadow:0 2px 10px rgba(0,0,0,.42);
}
.video-feature-large .youtube-thumb,
.video-thumb-card .youtube-thumb,
.photo-thumb-card a{
  border-radius:4px;
  overflow:hidden;
  box-shadow:0 4px 14px rgba(0,0,0,.10);
}
.video-feature-large .youtube-thumb img{
  height:140px !important;
}
.video-thumb-card .youtube-thumb img,
.photo-thumb-card img{
  height:70px !important;
}
.video-thumb-card .mini-title,
.photo-thumb-card .mini-title{
  font-size:9px !important;
  margin-top:5px !important;
  font-weight:700;
}


/* V9.2 larger interface, bigger text, bigger banner text */
.container{
  width:min(1220px, calc(100% - 24px)) !important;
}
.site-top .container{
  padding:10px 0 !important;
}
.logo-round{
  width:48px !important;
  height:48px !important;
  font-size:18px !important;
}
.site-title{
  font-size:22px !important;
}
.site-desc{
  display:block !important;
  font-size:14px !important;
}
.top-date{
  font-size:13px !important;
}
.main-nav a{
  padding:11px 12px !important;
  font-size:14px !important;
}
.top-featured{
  gap:12px !important;
  margin:10px 0 12px !important;
}
.slider-image{
  height:320px !important;
}
.slider-image img{
  height:320px !important;
}
.slider-caption{
  padding:12px 14px !important;
}
.slider-caption h2{
  font-size:20px !important;
  line-height:1.4 !important;
}
.slider-caption p{
  font-size:14px !important;
  line-height:1.65 !important;
}
.section-title{
  padding:8px 10px !important;
  font-size:14px !important;
}
.news-list,.right-list,.banner-stack,.portal-box .box-body,.widget-box .inner{
  padding:12px !important;
}
.news-item{
  grid-template-columns:110px 1fr !important;
  gap:10px !important;
  padding-bottom:10px !important;
  margin-bottom:10px !important;
}
.news-thumb,.news-thumb img{
  width:110px !important;
  height:82px !important;
}
.news-item h3{
  font-size:16px !important;
  line-height:1.45 !important;
}
.news-item p{
  font-size:13px !important;
  line-height:1.65 !important;
}
.portal-grid{
  gap:12px !important;
}
.portal-box .section-title{
  font-size:14px !important;
}
.portal-feature .feature-thumb{
  height:150px !important;
}
.portal-feature .feature-thumb img{
  height:150px !important;
}
.portal-feature h3{
  font-size:16px !important;
  line-height:1.45 !important;
  margin:10px 0 6px !important;
}
.small-links li{
  font-size:13px !important;
  line-height:1.65 !important;
  padding:6px 0 !important;
}
.bottom-wrap{
  gap:12px !important;
  margin-top:12px !important;
}
.latest-item{
  grid-template-columns:96px 1fr !important;
  gap:10px !important;
  padding:10px 0 !important;
}
.latest-thumb,.latest-thumb img{
  width:96px !important;
  height:72px !important;
}
.latest-item h3{
  font-size:15px !important;
  line-height:1.45 !important;
}
.latest-item p{
  font-size:13px !important;
  line-height:1.65 !important;
}
.sidebar-stack{
  gap:12px !important;
}
.widget-box .section-title{
  font-size:14px !important;
}
.follow-list li,.tiny-list li{
  font-size:13px !important;
  line-height:1.65 !important;
  padding:6px 0 !important;
}
.search-field,.search-submit{
  font-size:13px !important;
  padding:9px !important;
}
.banner-box{
  min-height:86px !important;
}
.banner-box span{
  font-size:18px !important;
  line-height:1.35 !important;
  padding:28px 16px 16px 16px !important;
}
.banner-box::after{
  width:22px !important;
  height:22px !important;
  line-height:22px !important;
  font-size:12px !important;
}
.video-feature-large .youtube-thumb img{
  height:180px !important;
}
.video-thumb-card .youtube-thumb img,
.photo-thumb-card img{
  height:100px !important;
}
.video-title-mini{
  font-size:13px !important;
  line-height:1.6 !important;
}
.video-thumb-card .mini-title,
.photo-thumb-card .mini-title{
  font-size:12px !important;
  line-height:1.5 !important;
}
.footer-link{
  font-size:12px !important;
  padding:10px 6px !important;
}
.site-footer h4{
  font-size:16px !important;
}
.site-footer p,.site-footer a{
  font-size:13px !important;
  line-height:1.7 !important;
}
@media (max-width:1024px){
  .container{
    width:min(100%, calc(100% - 18px)) !important;
  }
}


/* V9.4 top hero fallback image support */
.slider-image img{
  width:100%;
  object-fit:cover;
  display:block;
}


/* V9.4 better top-right cards spacing */
.top-featured > .card{
  min-width:0;
}


/* V10.6 remove top-right list, keep banner clean */
.top-featured .card .banner-stack.banner-list{margin-top:0 !important;}



/* V10.8 branding */
.logo-round{
  overflow:hidden;
}
.logo-round img{
  display:block;
}
.site-hero-banner{
  width:100%;
  background-size:cover;
  background-position:center;
  border-top:1px solid rgba(255,255,255,.12);
  border-bottom:1px solid rgba(0,0,0,.08);
}


/* V10.9 CMS banner text */
.site-hero-banner{
  position:relative;
  display:flex;
  align-items:center;
}
.site-hero-banner__overlay{
  position:absolute;
  inset:0;
}
.site-hero-banner__content{
  position:relative;
  z-index:2;
  width:min(1220px, calc(100% - 24px));
  margin:0 auto;
  padding:18px 10px;
}
.site-hero-banner__link{
  color:#fff;
  text-decoration:none;
  display:inline-block;
}
.site-hero-banner__title{
  font-size:34px;
  line-height:1.2;
  font-weight:800;
  color:#fff;
  text-shadow:0 3px 18px rgba(0,0,0,.4);
}
.site-hero-banner__subtitle{
  margin-top:8px;
  font-size:18px;
  line-height:1.5;
  color:#fff;
  text-shadow:0 2px 12px rgba(0,0,0,.4);
}
@media (max-width:768px){
  .site-hero-banner__title{font-size:24px}
  .site-hero-banner__subtitle{font-size:15px}
}


/* V15.4 Long Xuyen PRO */
.top-featured.longxuyen-v154{
  grid-template-columns:2.35fr 1.08fr .97fr !important;
  align-items:start;
}
.top-mid-card.v154-scroll-card,
.top-right-card{
  height:100%;
}
.v154-scroll-list{
  max-height:520px;
  overflow:auto;
  padding-right:4px;
}
.v154-scroll-list::-webkit-scrollbar{width:8px}
.v154-scroll-list::-webkit-scrollbar-thumb{background:#bfd0dc;border-radius:20px}
.bottom-wrap{
  align-items:start;
}
.sidebar-right-v154 .banner-stack{
  margin-bottom:10px;
}
.banner-box.v154{
  min-height:86px !important;
  display:block;
}
.banner-box.v154::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(0,0,0,calc(var(--mtgv154-overlay, .28) * .55)), rgba(0,0,0,var(--mtgv154-overlay, .28)));
  opacity:0;
  z-index:1;
  transition:opacity .18s ease;
}
.banner-box.v154.image-banner::before{
  opacity:1;
}
.banner-box.v154 span{
  min-height:inherit;
  display:flex;
  align-items:center;
  width:100%;
  line-height:1.35;
}
.banner-box.v154:hover{transform:translateY(-1px)}
.news-list .news-item,
.latest-box .latest-item{
  align-items:flex-start;
}
.news-item h3,
.latest-item h3{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.news-item p,
.latest-item p{
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
@media (max-width:1024px){
  .top-featured.longxuyen-v154{grid-template-columns:1fr !important;}
  .v154-scroll-list{max-height:none;overflow:visible}
}


/* V15.5 tighter Long Xuyen tuning */
.top-featured.longxuyen-v154{grid-template-columns:2.38fr 1.02fr .82fr;gap:6px;align-items:start}
.top-featured.longxuyen-v154 > .card{min-width:0}
.top-mid-card.v154-scroll-card{max-height:318px;overflow:hidden}
.v154-scroll-list{max-height:278px;overflow:auto;padding-right:4px}
.v154-scroll-list::-webkit-scrollbar{width:6px}.v154-scroll-list::-webkit-scrollbar-thumb{background:#b8c7d3;border-radius:20px}
.top-right-card{display:flex;flex-direction:column;min-height:318px}
.top-right-banner-stack{gap:6px;padding:6px;align-content:start}
.top-right-banner-stack .banner-box{min-height:72px;height:72px;font-size:12px}
.top-right-banner-stack .banner-box span{line-height:1.35}
.portal-grid{grid-template-columns:repeat(4,1fr);gap:6px}
.portal-box{background:#f9fbfc}
.portal-box .box-body{min-height:248px}
.portal-feature .feature-thumb{height:100px}
.portal-feature .feature-thumb img{height:100px}
.bottom-wrap{grid-template-columns:2.94fr .86fr;gap:6px;align-items:start}
.latest-box .box-body{padding:7px 8px}
.sidebar-right-v154 .widget-box{margin-bottom:6px}
.footer-links .container{grid-template-columns:repeat(5,1fr)}
@media (max-width:1024px){.portal-grid{grid-template-columns:1fr 1fr}.top-featured.longxuyen-v154,.bottom-wrap{grid-template-columns:1fr}}
@media (max-width:700px){.portal-grid,.footer-links .container,.top-featured.longxuyen-v154{grid-template-columns:1fr}}


/* V15.6 tighter Long Xuyen + equal news boxes */
body{background:#d5d9de}
.container{width:min(1002px,calc(100% - 10px)) !important;max-width:1002px !important}
.site-top .container{padding:4px 0}
.site-title{font-size:13px;letter-spacing:.1px}
.top-date{font-size:8px}
.main-nav a{padding:6px 7px;font-size:9px}

.top-featured.longxuyen-v154{
  grid-template-columns:2.42fr 1.02fr .82fr !important;
  gap:5px !important;
  margin:5px 0 6px !important;
  align-items:stretch !important;
}
.top-featured.longxuyen-v154 > .card{
  min-height:310px;
  display:flex;
  flex-direction:column;
}
.slider-image,
.slider-image img{height:205px}
.slider-caption{padding:5px 7px}
.slider-caption h2{font-size:12px;line-height:1.28}
.slider-caption p{font-size:9px;line-height:1.38}
.top-mid-card.v154-scroll-card,
.top-right-card{min-height:310px;max-height:310px;overflow:hidden}
.v154-scroll-list{max-height:270px;overflow:auto;padding-right:3px}
.top-right-banner-stack{padding:5px;gap:5px}
.top-right-banner-stack .banner-box{height:72px;min-height:72px;font-size:11px}

.section-title{padding:3px 5px;font-size:9px;line-height:1.2}
.portal-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:5px;
  align-items:stretch;
}
.portal-box{
  background:#f7fafc;
  display:flex;
  flex-direction:column;
  min-width:0;
}
.portal-box .section-title{flex:0 0 auto}
.portal-box .box-body{
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  min-height:266px;
  padding:5px;
}
.portal-feature{
  flex:0 0 auto;
  margin-bottom:5px;
}
.portal-feature .feature-thumb,
.portal-feature .feature-thumb img{height:94px}
.portal-feature h3{
  font-size:10px;
  line-height:1.3;
  margin:5px 0 0;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:26px;
}
.small-links{
  flex:1 1 auto;
  margin:0;
  padding:0;
  list-style:none;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
}
.small-links li{
  font-size:9px;
  line-height:1.4;
  padding:3px 0;
  border-bottom:1px dashed var(--border);
}
.small-links li:last-child{border-bottom:none}
.small-links a{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:25px;
}

.bottom-wrap{
  grid-template-columns:2.98fr .84fr;
  gap:5px;
  margin-top:5px;
  align-items:start;
}
.latest-box .box-body{padding:6px 7px}
.latest-item{grid-template-columns:56px 1fr;gap:5px;padding:5px 0}
.latest-thumb,.latest-thumb img{width:56px;height:40px}
.latest-item h3{font-size:10px;line-height:1.3}
.latest-item p{font-size:9px;line-height:1.36}
.sidebar-stack{gap:5px}
.sidebar-right-v154 .widget-box{margin-bottom:5px}
.widget-box .inner{padding:5px}
.media-grid{gap:4px}
.media-tile{min-height:40px}
.media-tile img{height:40px}
.footer-links{margin-top:5px}
.footer-links .container{gap:4px}
.footer-link{font-size:8px;padding:6px 2px}
.site-footer{margin-top:5px}
.site-footer .container{padding:7px 0;gap:7px}
.site-footer h4{font-size:10px}
.site-footer p,.site-footer a{font-size:8px}

@media (max-width:1024px){
  .top-featured.longxuyen-v154,
  .bottom-wrap{grid-template-columns:1fr !important}
  .portal-grid{grid-template-columns:1fr 1fr}
  .top-mid-card.v154-scroll-card,
  .top-right-card{max-height:none}
  .v154-scroll-list{max-height:none;overflow:visible}
}
@media (max-width:700px){
  .portal-grid,
  .footer-links .container,
  .top-featured.longxuyen-v154{grid-template-columns:1fr !important}
}


/* V15.7 fixed white boxes + top middle equal height */
.top-featured.longxuyen-v154{
  grid-template-columns:2.42fr 1.08fr .82fr !important;
  align-items:stretch !important;
}
.top-featured.longxuyen-v154 > .card{
  height:322px;
  min-height:322px;
  max-height:322px;
}
.slider-card{
  overflow:hidden;
}
.top-mid-card.v154-scroll-card,
.top-right-card{
  height:322px;
  min-height:322px;
  max-height:322px;
}
.top-mid-card.v154-scroll-card .section-title,
.top-right-card .section-title,
.portal-box .section-title,
.latest-box .section-title,
.widget-box .section-title{
  min-height:24px;
}
.v154-scroll-list{
  max-height:none;
  height:calc(100% - 24px);
  display:flex;
  flex-direction:column;
  gap:0;
  overflow:auto;
}
.top-mid-card.v154-scroll-card .news-item{
  flex:1 0 auto;
  align-items:flex-start;
}
.top-mid-card.v154-scroll-card .news-item:last-child{
  margin-bottom:0;
}
.top-right-banner-stack{
  min-height:calc(100% - 24px);
}

.portal-grid{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  grid-auto-rows:1fr;
  align-items:stretch !important;
}
.portal-box{
  display:flex !important;
  flex-direction:column !important;
  height:100% !important;
  background:#ffffff !important;
}
.portal-box .box-body{
  flex:1 1 auto !important;
  min-height:278px !important;
  height:278px !important;
  overflow:hidden !important;
  display:flex !important;
  flex-direction:column !important;
  background:#ffffff !important;
}
.portal-feature{
  flex:0 0 auto;
}
.portal-feature .feature-thumb,
.portal-feature .feature-thumb img{
  height:96px !important;
}
.portal-feature h3{
  min-height:28px !important;
  max-height:28px !important;
}
.small-links{
  flex:1 1 auto !important;
  overflow:hidden !important;
}
.small-links li{
  min-height:26px;
}
.small-links a{
  min-height:24px !important;
  max-height:24px !important;
}

.bottom-wrap{
  grid-template-columns:3fr .84fr !important;
  align-items:start !important;
}
.latest-box{
  background:#ffffff !important;
}
.latest-box .box-body{
  min-height:372px;
  background:#ffffff !important;
}
.widget-box,
.widget-box .inner,
.card,
.top-mid-card.v154-scroll-card,
.top-right-card{
  background:#ffffff !important;
}

@media (max-width:1024px){
  .top-featured.longxuyen-v154 > .card,
  .top-mid-card.v154-scroll-card,
  .top-right-card,
  .portal-box .box-body{
    height:auto !important;
    max-height:none !important;
  }
  .v154-scroll-list{
    height:auto !important;
  }
}

/* V15.8 - Thanh trượt cho Tin mới cập nhật */
.latest-box{
  display:flex !important;
  flex-direction:column !important;
}
.latest-box .section-title{
  flex:0 0 auto;
}
.latest-box .box-body{
  flex:1 1 auto !important;
  min-height:372px !important;
  max-height:372px !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding-right:6px !important;
  scrollbar-width:thin;
  scrollbar-color:#9eb9c9 #eef4f7;
}
.latest-box .box-body::-webkit-scrollbar{
  width:8px;
}
.latest-box .box-body::-webkit-scrollbar-track{
  background:#eef4f7;
}
.latest-box .box-body::-webkit-scrollbar-thumb{
  background:#9eb9c9;
  border-radius:10px;
}
.latest-box .latest-item{
  flex:0 0 auto !important;
}
@media (max-width:1024px){
  .latest-box .box-body{
    max-height:none !important;
    overflow:visible !important;
    padding-right:0 !important;
  }
}


/* V15.9 right sidebar image + prayer note */
.top-right-hero-card{padding:6px}
.top-right-hero-link{display:block;background:#fff}
.top-right-hero-link img{display:block;width:100%;height:auto;object-fit:cover;border:1px solid #c7d1d8}
.widget-image-card .inner{padding:6px}
.sidebar-image-card-link{display:block}
.sidebar-image-card-link img{display:block;width:100%;height:auto;border:1px solid #c7d1d8}
.widget-prayer-note .inner{padding:10px 12px}
.prayer-note-text,.sidebar-note-text{font-size:15px;line-height:1.6;color:#2f2f2f}
.prayer-note-text p,.sidebar-note-text p{margin:0 0 10px}
.prayer-note-text p:last-child,.sidebar-note-text p:last-child{margin-bottom:0}

/* V16.0 Banner Sidebar PRO integrated poster + prayer */
.mtgv154-poster .section-title,
.mtgv154-prayer .section-title{font-weight:700}
.mtgv154-poster .top-right-hero-link{display:block}
.mtgv154-prayer .inner{padding:0}
.mtgv154-prayer .prayer-note-text p{margin:0 0 8px}
.mtgv154-prayer .prayer-note-text p:last-child{margin-bottom:0}
.sidebar-right-v154 .mtgv154-prayer{margin-bottom:6px}


/* ===== V17.1 layout refresh ===== */
.home-layout-v171{
  display:grid;
  grid-template-columns:minmax(0,1fr) 260px;
  gap:12px;
  align-items:start;
  margin:8px 0 12px;
}
.home-primary-v171{min-width:0}
.top-featured-v171{
  display:grid;
  grid-template-columns:minmax(0,1.95fr) minmax(220px,.70fr);
  gap:8px;
  margin-bottom:10px;
  align-items:start;
}
.v171-top-news-card .news-list{
  padding:8px;
}
.v171-top-news-card .news-item{
  grid-template-columns:82px 1fr;
}
.v171-top-news-card .news-thumb,
.v171-top-news-card .news-thumb img{
  width:82px;height:62px;object-fit:cover;
}
.portal-grid-dynamic{
  display:grid;
  gap:10px;
}
.portal-grid-dynamic.columns-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.portal-grid-dynamic.columns-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.v171-bottom-wrap{margin-top:10px}
.v171-bottom-wrap .latest-box{width:100%}
.sidebar-right-v171{
  position:sticky;
  top:12px;
  align-self:start;
}
.sidebar-right-v171 .top-right-hero-card,
.sidebar-right-v171 .widget-box,
.sidebar-right-v171 .banner-stack{
  margin-bottom:10px;
}
.sidebar-right-v171 .banner-stack{padding:0}
.sidebar-right-v171 .banner-box{
  min-height:70px;
  height:auto;
}
.sidebar-right-v171 .top-right-hero-card{background:#fff;border:1px solid var(--border)}
.sidebar-right-v171 .top-right-hero-card img{display:block;width:100%}
.sidebar-right-v171 .widget-box{background:#fff;border:1px solid var(--border)}
@media (max-width: 980px){
  .home-layout-v171{grid-template-columns:1fr}
  .sidebar-right-v171{position:static}
}
@media (max-width: 760px){
  .top-featured-v171{grid-template-columns:1fr}
  .portal-grid-dynamic.columns-3,
  .portal-grid-dynamic.columns-4{grid-template-columns:1fr}
}


/* V18.2 fix per-row render */
.portal-grid.portal-grid-dynamic.columns-3{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
}
.portal-grid.portal-grid-dynamic.columns-4{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
}
@media (max-width:760px){
  .portal-grid.portal-grid-dynamic.columns-3,
  .portal-grid.portal-grid-dynamic.columns-4{
    grid-template-columns:1fr !important;
  }
}


/* V21.1 prayer background fix */
.widget-prayer-note.mtgv154-prayer{overflow:hidden}
.widget-prayer-note.mtgv154-prayer .inner{background:var(--mtgv154-prayer-bg, transparent) !important}
.widget-prayer-note.mtgv154-prayer .section-title{margin:0}

/* V21.2 wider left column */
.home-primary-v171 .slider-card{min-width:0;}
.home-primary-v171 .portal-grid-dynamic.columns-3{grid-template-columns:repeat(3,minmax(0,1fr)) !important;}
.home-primary-v171 .portal-grid-dynamic.columns-4{grid-template-columns:repeat(4,minmax(0,1fr)) !important;}
@media (max-width:1100px){.home-layout-v171{grid-template-columns:minmax(0,1fr) 248px !important;}.top-featured-v171{grid-template-columns:minmax(0,1.85fr) minmax(210px,.74fr) !important;}}
@media (max-width:980px){.home-layout-v171{grid-template-columns:1fr !important;}}

/* V21.3 wider left + tighter right */
.home-layout-v171{
  grid-template-columns:minmax(0,1fr) 236px !important;
  gap:10px;
}
.top-featured-v171{
  grid-template-columns:minmax(0,2.12fr) minmax(205px,.68fr) !important;
  gap:7px;
}
.sidebar-right-v171{
  max-width:236px;
}
.sidebar-right-v171 .top-right-hero-card,
.sidebar-right-v171 .widget-box,
.sidebar-right-v171 .banner-stack{
  margin-bottom:8px;
}
.v171-top-news-card .news-list{padding:7px;}
.v171-top-news-card .news-item{grid-template-columns:78px 1fr;gap:7px;}
.v171-top-news-card .news-thumb,
.v171-top-news-card .news-thumb img{width:78px;height:58px;}
.home-primary-v171 .slider-image,
.home-primary-v171 .slider-image img{height:356px;}
@media (max-width:1200px){
  .home-layout-v171{grid-template-columns:minmax(0,1fr) 228px !important;gap:8px;}
  .top-featured-v171{grid-template-columns:minmax(0,2.05fr) minmax(195px,.66fr) !important;}
  .sidebar-right-v171{max-width:228px;}
}
@media (max-width:1100px){
  .home-layout-v171{grid-template-columns:minmax(0,1fr) 220px !important;}
  .top-featured-v171{grid-template-columns:minmax(0,2fr) minmax(188px,.64fr) !important;}
  .sidebar-right-v171{max-width:220px;}
}
@media (max-width:980px){
  .home-layout-v171{grid-template-columns:1fr !important;}
  .sidebar-right-v171{max-width:none;}
}


/* V21.7 Long Xuyen stronger */
.container{
  max-width:1240px;
}
.home-layout-v171{
  grid-template-columns:minmax(0,1fr) 228px !important;
  gap:8px !important;
  margin:6px 0 10px;
}
.top-featured-v171{
  grid-template-columns:minmax(0,2.22fr) minmax(188px,.62fr) !important;
  gap:6px !important;
  margin-bottom:8px !important;
}
.home-primary-v171 .slider-card,
.home-primary-v171 .top-mid-card,
.portal-box,
.sidebar-right-v171 .top-right-hero-card,
.sidebar-right-v171 .widget-box,
.sidebar-right-v171 .banner-box{
  border-radius:0 !important;
  box-shadow:none !important;
}
.home-primary-v171 .slider-image,
.home-primary-v171 .slider-image img{height:338px !important;}
.v171-top-news-card .section-title,
.portal-box .section-title,
.sidebar-right-v171 .section-title{
  font-size:10px !important;
  letter-spacing:.2px;
  padding:4px 6px !important;
}
.v171-top-news-card .news-list{padding:6px !important;}
.v171-top-news-card .news-item{grid-template-columns:74px 1fr !important;gap:6px !important;padding:6px 0 !important;}
.v171-top-news-card .news-thumb,
.v171-top-news-card .news-thumb img{width:74px !important;height:54px !important;}
.portal-grid-dynamic{gap:8px !important;}
.portal-box .box-body{padding:6px !important;}
.portal-feature{gap:6px !important;}
.small-links li{padding:4px 0 !important;}
.sidebar-right-v171{max-width:228px !important;}
.sidebar-right-v171 .top-right-hero-card,
.sidebar-right-v171 .widget-box,
.sidebar-right-v171 .banner-stack{margin-bottom:8px !important;}
.sidebar-right-v171 .banner-box{min-height:64px !important;}
.footer-main{margin-top:10px !important;}
@media (max-width:1200px){
  .container{max-width:1180px;}
  .home-layout-v171{grid-template-columns:minmax(0,1fr) 220px !important;}
  .sidebar-right-v171{max-width:220px !important;}
  .top-featured-v171{grid-template-columns:minmax(0,2.12fr) minmax(180px,.60fr) !important;}
}
@media (max-width:1100px){
  .home-layout-v171{grid-template-columns:minmax(0,1fr) 212px !important;gap:8px !important;}
  .sidebar-right-v171{max-width:212px !important;}
  .top-featured-v171{grid-template-columns:minmax(0,2.05fr) minmax(172px,.58fr) !important;}
  .home-primary-v171 .slider-image,
  .home-primary-v171 .slider-image img{height:320px !important;}
}
@media (max-width:980px){
  .home-layout-v171{grid-template-columns:1fr !important;}
  .sidebar-right-v171{max-width:none !important;}
}
@media (max-width:760px){
  .top-featured-v171{grid-template-columns:1fr !important;gap:8px !important;}
  .portal-grid-dynamic.columns-3,
  .portal-grid-dynamic.columns-4{grid-template-columns:1fr !important;}
  .home-primary-v171 .slider-image,
  .home-primary-v171 .slider-image img{height:240px !important;}
}


/* ===== V21.8 - CUC SAT LONG XUYEN ===== */
body{
  background:#d4d9df !important;
  color:#173042;
}
.container{
  width:min(1006px,calc(100% - 10px)) !important;
}
.site-top{
  background:#ffffff !important;
  border-top:1px solid #0a79b3 !important;
  box-shadow:0 1px 0 rgba(0,0,0,.03);
}
.site-top .container{
  padding:4px 0 !important;
}
.logo-round{
  width:31px !important;
  height:31px !important;
  font-size:13px !important;
}
.site-title{
  font-size:14px !important;
  line-height:1.2;
  color:#0a5d8d !important;
}
.top-date{
  font-size:9px !important;
}
.main-nav{
  background:#0c88c6 !important;
  border-top:1px solid #1aa0dd;
  border-bottom:1px solid #066b9e;
}
.main-nav a{
  padding:6px 7px !important;
  font-size:9px !important;
  letter-spacing:.1px;
}
.main-nav a:hover,
.main-nav .current-menu-item>a,
.main-nav .current_page_item>a{
  background:#066b9e !important;
}
.home-layout-v171{
  grid-template-columns:minmax(0,1fr) 210px !important;
  gap:8px !important;
  align-items:start;
}
.home-primary-v171{
  min-width:0;
}
.top-featured-v171{
  grid-template-columns:minmax(0,2.18fr) minmax(170px,.58fr) !important;
  gap:8px !important;
  margin:6px 0 8px !important;
}
.home-primary-v171 .slider-card,
.home-primary-v171 .top-mid-card,
.portal-box,
.sidebar-right-v171 .top-right-hero-card,
.sidebar-right-v171 .widget-box,
.sidebar-right-v171 .banner-stack,
.sidebar-right-v171 .banner-box{
  background:#fff !important;
  border:1px solid #c8d2d9 !important;
  box-shadow:none !important;
}
.home-primary-v171 .slider-image,
.home-primary-v171 .slider-image img{
  height:312px !important;
}
.slider-caption{
  padding:6px 8px !important;
  background:#d7e3ec !important;
}
.slider-caption h2{
  font-size:12px !important;
  line-height:1.35 !important;
  margin:0 0 3px !important;
}
.slider-caption p{
  font-size:10px !important;
  line-height:1.42 !important;
}
.section-title,
.v171-top-news-card .section-title,
.portal-box .section-title,
.sidebar-right-v171 .section-title{
  padding:4px 6px !important;
  min-height:24px;
  background:#fbfdfe !important;
  color:#d5462d !important;
  font-size:10px !important;
  font-weight:700 !important;
  border-bottom:1px solid #d7e0e6 !important;
  text-transform:uppercase;
}
.section-title::before{
  content:"✚";
  color:#f39a21 !important;
}
.v171-top-news-card .news-list{
  padding:6px !important;
}
.v171-top-news-card .news-item{
  grid-template-columns:72px 1fr !important;
  gap:6px !important;
  padding-bottom:6px !important;
  margin-bottom:6px !important;
}
.v171-top-news-card .news-thumb,
.v171-top-news-card .news-thumb img{
  width:72px !important;
  height:52px !important;
}
.news-item h3,
.portal-feature h3,
.latest-item h3{
  font-size:10px !important;
  line-height:1.34 !important;
}
.news-item p,
.latest-item p,
.small-links li,
.follow-list li,
.tiny-list li{
  font-size:9px !important;
  line-height:1.4 !important;
}
.portal-grid-dynamic{
  gap:8px !important;
  margin-top:0 !important;
}
.portal-grid.portal-grid-dynamic.columns-3{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
}
.portal-grid.portal-grid-dynamic.columns-4{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
}
.portal-box .box-body{
  padding:6px !important;
}
.portal-feature{
  margin-bottom:6px !important;
}
.portal-feature .feature-thumb,
.portal-feature .feature-thumb img{
  height:90px !important;
}
.small-links li{
  padding:4px 0 !important;
}
.sidebar-right-v171{
  max-width:210px !important;
  gap:8px !important;
}
.sidebar-right-v171 .top-right-hero-card,
.sidebar-right-v171 .widget-box,
.sidebar-right-v171 .banner-stack{
  margin-bottom:8px !important;
}
.sidebar-right-v171 .banner-box{
  min-height:60px !important;
  font-size:10px !important;
}
.site-footer{
  margin-top:8px !important;
}
.site-footer .container{
  padding:8px 0 !important;
}
.footer-links .container{
  gap:5px !important;
}
.footer-link{
  font-size:9px !important;
}
@media (max-width:1100px){
  .home-layout-v171{
    grid-template-columns:minmax(0,1fr) 204px !important;
  }
  .top-featured-v171{
    grid-template-columns:minmax(0,2.14fr) minmax(165px,.56fr) !important;
  }
  .sidebar-right-v171{
    max-width:204px !important;
  }
}
@media (max-width:980px){
  .home-layout-v171{
    grid-template-columns:1fr !important;
  }
  .sidebar-right-v171{
    max-width:none !important;
  }
}
@media (max-width:768px){
  .top-featured-v171{
    grid-template-columns:1fr !important;
    gap:8px !important;
  }
  .portal-grid.portal-grid-dynamic.columns-3,
  .portal-grid.portal-grid-dynamic.columns-4{
    grid-template-columns:1fr !important;
  }
  .home-primary-v171 .slider-image,
  .home-primary-v171 .slider-image img{
    height:230px !important;
  }
}

/* ===== V21.9 - GAN NHU FULL LONG XUYEN ===== */
body{
  background:#d3d8de !important;
}
.container{
  width:min(998px,calc(100% - 10px)) !important;
}
.site-top{
  border-top:1px solid #0a76ad !important;
}
.site-top .container{
  padding:3px 0 !important;
}
.branding{
  gap:8px !important;
}
.logo-round{
  width:29px !important;
  height:29px !important;
  font-size:12px !important;
}
.site-title,
.site-title a{
  font-size:13px !important;
  color:#0a5c89 !important;
}
.site-desc{
  display:none !important;
}
.top-date{
  font-size:8px !important;
  color:#7a8c99 !important;
}
.main-nav{
  background:#0b86c5 !important;
  border-top:1px solid #1ca1db !important;
  border-bottom:1px solid #056b9b !important;
}
.main-nav .container{
  min-height:30px !important;
}
.main-nav a{
  padding:6px 6px !important;
  font-size:8.5px !important;
}
.main-nav .search-icon{
  font-size:10px !important;
  padding-right:5px !important;
}
.home-layout-v171{
  grid-template-columns:minmax(0,1fr) 204px !important;
  gap:7px !important;
}
.top-featured-v171{
  grid-template-columns:minmax(0,2.22fr) minmax(164px,.54fr) !important;
  gap:7px !important;
  margin:5px 0 7px !important;
}
.home-primary-v171 .slider-image,
.home-primary-v171 .slider-image img{
  height:300px !important;
}
.slider-arrow{
  width:26px !important;
  height:26px !important;
  font-size:16px !important;
}
.slider-caption{
  padding:5px 7px !important;
  background:#d5e1ea !important;
}
.slider-caption h2{
  font-size:11px !important;
  margin:0 0 2px !important;
}
.slider-caption p{
  font-size:9px !important;
}
.slider-dots{
  bottom:8px !important;
}
.slider-dot{
  width:7px !important;
  height:7px !important;
}
.section-title,
.v171-top-news-card .section-title,
.portal-box .section-title,
.sidebar-right-v171 .section-title{
  padding:3px 6px !important;
  min-height:22px !important;
  background:#fcfeff !important;
  color:#d13f28 !important;
  font-size:9px !important;
  letter-spacing:.15px;
}
.v171-top-news-card .news-list,
.portal-box .box-body,
.sidebar-right-v171 .widget-box .inner,
.sidebar-right-v171 .banner-stack{
  padding:5px !important;
}
.v171-top-news-card .news-item{
  grid-template-columns:68px 1fr !important;
  gap:5px !important;
  padding-bottom:5px !important;
  margin-bottom:5px !important;
}
.v171-top-news-card .news-thumb,
.v171-top-news-card .news-thumb img{
  width:68px !important;
  height:48px !important;
}
.news-item h3,
.portal-feature h3,
.latest-item h3{
  font-size:9.5px !important;
}
.news-item p,
.latest-item p,
.small-links li,
.follow-list li,
.tiny-list li{
  font-size:8.5px !important;
}
.portal-grid-dynamic{
  gap:7px !important;
}
.portal-feature{
  margin-bottom:5px !important;
}
.portal-feature .feature-thumb,
.portal-feature .feature-thumb img{
  height:84px !important;
}
.small-links li{
  padding:3px 0 !important;
}
.sidebar-right-v171{
  max-width:204px !important;
  gap:7px !important;
}
.sidebar-right-v171 .top-right-hero-card,
.sidebar-right-v171 .widget-box,
.sidebar-right-v171 .banner-stack{
  margin-bottom:7px !important;
}
.sidebar-right-v171 .banner-box{
  min-height:56px !important;
  font-size:9px !important;
}
.footer-links{
  margin-top:5px !important;
}
.footer-links .container{
  gap:4px !important;
}
.footer-link{
  padding:6px 3px !important;
  font-size:8px !important;
}
.site-footer{
  margin-top:6px !important;
}
.site-footer .container{
  padding:7px 0 !important;
  gap:6px !important;
}
.site-footer h4{
  font-size:10px !important;
}
.site-footer p,
.site-footer a{
  font-size:8px !important;
}
@media (max-width:1100px){
  .home-layout-v171{
    grid-template-columns:minmax(0,1fr) 198px !important;
  }
  .top-featured-v171{
    grid-template-columns:minmax(0,2.18fr) minmax(160px,.53fr) !important;
  }
  .sidebar-right-v171{
    max-width:198px !important;
  }
}
@media (max-width:980px){
  .home-layout-v171{
    grid-template-columns:1fr !important;
  }
  .sidebar-right-v171{
    max-width:none !important;
  }
}
@media (max-width:768px){
  .top-featured-v171,
  .portal-grid.portal-grid-dynamic.columns-3,
  .portal-grid.portal-grid-dynamic.columns-4{
    grid-template-columns:1fr !important;
    gap:8px !important;
  }
  .home-primary-v171 .slider-image,
  .home-primary-v171 .slider-image img{
    height:220px !important;
  }
}


/* ===== V22.1: Can doi khung BAI VIET MOI ===== */
.v171-top-news-card .news-list,
.top-mid-card .news-list{
  display:flex !important;
  flex-direction:column;
  gap:0 !important;
}
.v171-top-news-card .news-item,
.top-mid-card .news-item{
  display:grid !important;
  grid-template-columns:84px minmax(0,1fr) !important;
  gap:10px !important;
  align-items:start !important;
  padding:9px 0 !important;
  min-height:82px !important;
  border-bottom:1px dashed #d8dde3 !important;
}
.v171-top-news-card .news-item:last-child,
.top-mid-card .news-item:last-child{
  border-bottom:0 !important;
}
.v171-top-news-card .news-thumb,
.top-mid-card .news-thumb{
  width:84px !important;
  height:60px !important;
  min-width:84px !important;
  overflow:hidden !important;
  display:block !important;
  background:#cfe3ef !important;
  border:1px solid #d7e0e7 !important;
}
.v171-top-news-card .news-thumb img,
.top-mid-card .news-thumb img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  display:block !important;
}
.v171-top-news-card .news-item > div,
.top-mid-card .news-item > div{
  min-width:0 !important;
}
.v171-top-news-card .news-item h3,
.top-mid-card .news-item h3{
  margin:0 0 4px !important;
  font-size:14px !important;
  line-height:1.35 !important;
  min-height:38px !important;
  overflow:hidden !important;
  display:-webkit-box !important;
  -webkit-line-clamp:2 !important;
  -webkit-box-orient:vertical !important;
}
.v171-top-news-card .news-item h3 a,
.top-mid-card .news-item h3 a{
  color:#004b8d !important;
}
.v171-top-news-card .news-item p,
.top-mid-card .news-item p{
  margin:0 !important;
  font-size:12px !important;
  line-height:1.45 !important;
  color:#5e6d79 !important;
  min-height:34px !important;
  overflow:hidden !important;
  display:-webkit-box !important;
  -webkit-line-clamp:2 !important;
  -webkit-box-orient:vertical !important;
}
.v171-top-news-card .section-title,
.top-mid-card .section-title{
  margin-bottom:0 !important;
}
@media (max-width:768px){
  .v171-top-news-card .news-item,
  .top-mid-card .news-item{
    grid-template-columns:74px minmax(0,1fr) !important;
    gap:8px !important;
    min-height:76px !important;
  }
  .v171-top-news-card .news-thumb,
  .top-mid-card .news-thumb{
    width:74px !important;
    height:54px !important;
    min-width:74px !important;
  }
}

/* ===== V22.2: Can doi 3 box TIN HOI DONG ===== */
.portal-grid.portal-grid-dynamic{
  align-items:stretch !important;
}
.portal-grid.portal-grid-dynamic .portal-box{
  display:flex !important;
  flex-direction:column !important;
  min-width:0 !important;
}
.portal-grid.portal-grid-dynamic .portal-box .box-body{
  display:flex !important;
  flex-direction:column !important;
  min-height:345px !important;
  padding:8px !important;
}
.portal-grid.portal-grid-dynamic .portal-feature{
  display:flex !important;
  flex-direction:column !important;
  margin-bottom:8px !important;
  min-width:0 !important;
}
.portal-grid.portal-grid-dynamic .portal-feature .feature-thumb{
  width:100% !important;
  height:126px !important;
  overflow:hidden !important;
  border:1px solid #d7e0e7 !important;
  background:#cfe3ef !important;
}
.portal-grid.portal-grid-dynamic .portal-feature .feature-thumb img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  display:block !important;
}
.portal-grid.portal-grid-dynamic .portal-feature h3{
  margin:8px 0 0 !important;
  font-size:13px !important;
  line-height:1.4 !important;
  min-height:36px !important;
  overflow:hidden !important;
  display:-webkit-box !important;
  -webkit-line-clamp:2 !important;
  -webkit-box-orient:vertical !important;
}
.portal-grid.portal-grid-dynamic .portal-feature h3 a{
  color:#004b8d !important;
}
.portal-grid.portal-grid-dynamic .small-links{
  margin-top:auto !important;
  display:flex !important;
  flex-direction:column !important;
  gap:0 !important;
}
.portal-grid.portal-grid-dynamic .small-links li{
  min-height:40px !important;
  padding:6px 0 !important;
  line-height:1.42 !important;
  overflow:hidden !important;
  display:-webkit-box !important;
  -webkit-line-clamp:2 !important;
  -webkit-box-orient:vertical !important;
  border-bottom:1px dashed #d8dde3 !important;
}
.portal-grid.portal-grid-dynamic .small-links li:last-child{
  border-bottom:0 !important;
}
.portal-grid.portal-grid-dynamic .small-links a{
  color:#004b8d !important;
}
@media (max-width:1024px){
  .portal-grid.portal-grid-dynamic .portal-box .box-body{
    min-height:320px !important;
  }
}
@media (max-width:768px){
  .portal-grid.portal-grid-dynamic .portal-box .box-body{
    min-height:auto !important;
  }
  .portal-grid.portal-grid-dynamic .portal-feature .feature-thumb{
    height:116px !important;
  }
  .portal-grid.portal-grid-dynamic .portal-feature h3{
    min-height:unset !important;
  }
  .portal-grid.portal-grid-dynamic .small-links li{
    min-height:unset !important;
  }
}


/* V22.4 prayer bg fix */
.widget-prayer-note.mtgv154-prayer{background:var(--mtgv154-prayer-bg, #ffffff) !important}
.widget-prayer-note.mtgv154-prayer .prayer-note-text,
.widget-prayer-note.mtgv154-prayer .mtgv154-prayer-line,
.mtgv154-live-preview .mtgv154-preview-card{transition:background-color .15s ease,color .15s ease,border-color .15s ease}



/* V22.4 youtube fix on homepage */
.video-feature-large .video-frame{
  position:relative;
  width:100%;
  aspect-ratio:16 / 9;
  padding-top:0 !important;
  overflow:hidden;
  border-radius:8px;
  background:#000;
}
.video-feature-large .video-frame iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
  display:block;
}
.video-thumb-card .youtube-thumb.no-thumb{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:84px;
  background:#cfe4ef;
  border-radius:6px;
  text-decoration:none;
}
