/* ==========================================================================
   SkyNext content fixes — thay các plugin vá lẻ (nạp từ inc/content-fixes.php)
   ========================================================================== */

/* Thanh chuyên mục tin tức + nút "⋯ Thêm" (thay plugin Góc Tư Vấn Tabs Repair) */
.sn-news-navbar{display:flex;align-items:stretch;border-top:1px solid #edf2f7}
.sn-news-navbar .sn-news-nav{flex:1 1 auto;min-width:0;border-top:0}
.sn-news-more{position:relative;flex:0 0 auto}
.sn-news-more summary{display:flex;height:100%;min-height:46px;align-items:center;gap:5px;padding:0 0 0 16px;color:#4d596b;font-size:.79rem;font-weight:650;white-space:nowrap;cursor:pointer;list-style:none}
.sn-news-more summary::-webkit-details-marker{display:none}
.sn-news-more summary:hover,.sn-news-more[open] summary,.sn-news-more.is-active summary{color:var(--sk-dark)}
.sn-news-more.is-active summary{box-shadow:inset 0 -2px 0 var(--sk-secondary)}
.sn-news-more__menu{position:absolute;top:100%;right:0;z-index:60;min-width:270px;max-width:calc(100vw - 24px);padding:8px;border:1px solid rgba(8,45,91,.12);border-radius:12px;background:#fff;box-shadow:0 16px 40px rgba(8,45,91,.18)}
.sn-news-more__menu a{display:block;padding:10px 12px;border-radius:8px;color:#17375e;font-size:.86rem;font-weight:600;line-height:1.4}
.sn-news-more__menu a:hover,.sn-news-more__menu a.is-active{background:#eef5ff;color:var(--sk-primary)}

/* Bảng và khối <pre> trong bài viết (thay các plugin Mobile Repair) */
.content-prose{overflow-wrap:break-word}
.sk-table-scroll{width:100%;max-width:100%;margin:28px 0;overflow-x:auto;-webkit-overflow-scrolling:touch}
.sk-table-scroll>table{margin:0}
.sk-pre-scroll{max-width:100%;margin:24px 0;overflow-x:auto;-webkit-overflow-scrolling:touch}
.sk-pre-scroll>pre{width:max-content;min-width:100%;margin:0;overflow:visible;white-space:pre}
.content-prose img,.content-prose video{max-width:100%;height:auto}
.content-prose iframe{max-width:100%}
.content-prose figure,.content-prose .wp-caption{max-width:100%}
@media(max-width:767px){
	.sk-table-scroll>table{width:auto;min-width:640px}
	.sk-table-scroll th,.sk-table-scroll td{min-width:120px;padding:10px 12px;white-space:normal;word-break:normal;overflow-wrap:break-word;vertical-align:top;line-height:1.45}
	.sk-table-scroll::before,.sk-pre-scroll::before{position:sticky;left:0;display:block;margin-bottom:8px;padding:7px 10px;border-radius:8px;background:#f3f6fa;color:#4d596b;font-size:.8rem;content:"Vuốt ngang để xem đầy đủ →"}
	.content-prose ul,.content-prose ol{padding-left:24px}
}

/* ==========================================================================
   Mobile polish v1 — cân đối bố cục trên điện thoại
   ========================================================================== */
/* Bài viết: ảnh có caption width cố định (640px) làm cột nội dung tràn, chữ bị cắt mép phải */
.content-layout>*{min-width:0}
.content-prose .wp-caption{width:auto!important;max-width:100%}

@media(max-width:767px){
	/* --- Carousel vuốt ngang dùng chung --- */
	body.home .projects-section .project-grid,
	body.home .insights-section .post-grid,
	body .snx-culture__posters,
	body .sn-service-project-grid,
	body .sn-about-culture-simple{display:grid;grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:84%;gap:14px;margin-right:-15px;padding:2px 15px 8px 0;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:none}
	body.home .projects-section .project-grid::-webkit-scrollbar,
	body.home .insights-section .post-grid::-webkit-scrollbar,
	body .snx-culture__posters::-webkit-scrollbar,
	body .sn-service-project-grid::-webkit-scrollbar,
	body .sn-about-culture-simple::-webkit-scrollbar{display:none}
	body.home .projects-section .project-grid>*,
	body.home .insights-section .post-grid>*,
	body .snx-culture__posters>*,
	body .sn-service-project-grid>*,
	body .sn-about-culture-simple>*{min-width:0;scroll-snap-align:start}
	body.home .projects-section .reveal,body.home .insights-section .reveal{opacity:1!important;transform:none!important}
	.project-card:hover,.post-card:hover{transform:none}

	/* --- Trang chủ: dịch vụ dạng lưới 2x2 gọn --- */
	.service-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
	.service-card{padding:18px 15px 16px;display:flex;flex-direction:column}
	.service-card::after{right:-48px;bottom:-52px;width:110px;height:110px}
	.service-number{top:14px;right:14px;font-size:.72rem}
	.service-icon{width:44px;height:44px;margin-bottom:14px;border-radius:13px;font-size:1.2rem}
	.service-card h3{margin-bottom:6px;font-size:1rem;line-height:1.3}
	.service-card p{margin-bottom:10px;font-size:.84rem;line-height:1.5}
	.service-card a{margin-top:auto;font-size:.8rem}
	.services-section .section-heading p{font-size:.95rem}

	/* --- Văn hoá dân tộc: poster dạng thẻ vuốt --- */
	.snx-poster{aspect-ratio:4/5;height:auto}
	.snx-poster>img{height:100%;object-fit:cover}
	.snx-poster__cap{padding:20px!important}

	/* --- Landing dịch vụ --- */
	body .sn-service section{padding:40px 0}
	body .sn-service-section-head{margin-bottom:24px}
	body .sn-service-section-head h2{font-size:30px}
	body .sn-service-section-head p{font-size:15.5px;line-height:1.65}
	body .sn-service-problem-grid,body .sn-service-benefit-grid,body .sn-service-process-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
	body .sn-service-benefit-grid{margin-bottom:28px}
	body .sn-service-problem-grid article,body .sn-service-benefit-grid article,body .sn-service-process-grid article{min-height:0;padding:16px 14px;border-radius:16px}
	body .sn-service-problem-grid h3,body .sn-service-benefit-grid h3,body .sn-service-process-grid h3{margin:10px 0 6px;font-size:16px;line-height:1.3}
	body .sn-service-problem-grid p,body .sn-service-benefit-grid p,body .sn-service-process-grid p{font-size:13.5px;line-height:1.55}
	body .sn-service-proof-stats{margin-bottom:36px}
	body .sn-service-proof-note{margin-top:28px;padding:18px}
	body .sn-service-proof-note h3{font-size:26px}
	body .sn-service-guarantee-list article{padding:16px}

	/* --- Trang giới thiệu --- */
	body .sn-about-builder .sn-about-section{padding:42px 0}
	body .sn-about-metrics-simple{grid-template-columns:1fr 1fr}
	body .sn-about-metrics-simple>div{padding:18px 16px;border-bottom:1px solid #e1eaf5}
	body .sn-about-metrics-simple>div:nth-child(odd){border-right:1px solid #e1eaf5}
	body .sn-about-metrics-simple>div:nth-last-child(-n+2){border-bottom:0}
	body .sn-about-metrics-simple strong{font-size:22px}
	body .sn-about-timeline-simple,body .sn-about-team-cards-simple,body .sn-about-process-orbit{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
	body .sn-about-builder .sn-about-time-card{min-height:0;padding:16px 14px}
	body .sn-about-builder .sn-about-time-card h3{font-size:21px}
	body .sn-about-builder .sn-about-time-card h4{font-size:15.5px}
	body .sn-about-builder .sn-about-time-card p,body .sn-about-builder .sn-about-team-card p,body .sn-about-builder .sn-about-process-card p{font-size:13px;line-height:1.5}
	body .sn-about-builder .sn-about-team-card,body .sn-about-builder .sn-about-process-card{padding:16px 14px}
	body .sn-about-builder .sn-about-team-card h3,body .sn-about-builder .sn-about-process-card h3{font-size:16px}
	body .sn-about-builder .sn-about-vision-card{padding:26px 22px}
	body .sn-about-builder .sn-about-big-number{font-size:60px}
	body .sn-about-builder .sn-about-culture-cover{height:400px}

	/* --- Landing sản phẩm --- */
	body .pl .pl-feats{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
	body .pl .pl-feat{padding:16px 14px;border-radius:16px}
	body .pl .pl-feat i{width:38px;height:38px;border-radius:11px}
	body .pl .pl-feat h3{margin:10px 0 5px;font-size:16px}
	body .pl .pl-feat p{font-size:13.5px;line-height:1.55}
	body .pl .pl-gallery{columns:2;column-gap:8px}
	body .pl .pl-gallery figure{margin-bottom:8px;border-radius:12px}

	/* --- Nút liên hệ nổi: nhỏ gọn, bớt che chữ --- */
	.sk-floating-contact{right:10px;gap:10px}
	.sk-floating-contact__item{width:50px;height:50px}
	.sk-floating-contact__icon,.sk-floating-contact__icon svg{width:23px;height:23px}
	.sk-floating-contact__z{font-size:22px}
}
/* ==========================================================================
   Chuyên mục tin tức (Góc Tư Vấn): thu gọn khoảng cách giữa các hàng
   ========================================================================== */
.sn-news-category-list--thumbs article{min-height:0;padding-bottom:6px;margin-bottom:6px;gap:12px}
.sn-news-category-list--thumbs h3{margin:0 0 3px}
.sn-news-category-headlines{margin-top:8px}
.sn-news-category-headlines article{padding-top:8px;padding-bottom:8px}
@media(max-width:1120px){
	.sn-news-category-headlines article,.sn-news-category-headlines article+article{padding:6px 0}
}

/* Nút menu (☰) trên điện thoại/tablet: to hơn, dễ bấm */
@media(max-width:1080px){
	.menu-toggle.icon-button{width:52px;height:52px}
	.menu-toggle.icon-button .skynext-icon{width:34px;height:34px}
}

/* Di động: ẩn mô tả chuyên mục và đoạn tóm tắt bài để tiết kiệm diện tích (trang Tin tức + mọi chuyên mục) */
@media(max-width:767px){
	.sn-news-masthead__top>p,
	.sn-news-category-description,
	.sn-news-lead__body>p,
	.sn-news-category-feature>p,
	.sn-news-stream-item__body>p{display:none}
}

/* ==========================================================================
   Landing sản phẩm (Game tương tác .g3 · XopPlay .xp · App 2D .app2d)
   ========================================================================== */
/* Đường dẫn breadcrumb màu trắng trên nền sáng bị vô hình → đổi sang màu xám đọc được */
body .g3 .g-hero .breadcrumbs,body .xp .x-hero .breadcrumbs,body .app2d .a-hero .breadcrumbs{margin-bottom:14px;color:var(--sk-muted,#5f7289)}
body .g3 .g-hero .breadcrumbs a:hover,body .xp .x-hero .breadcrumbs a:hover,body .app2d .a-hero .breadcrumbs a:hover{color:var(--sk-primary,#0b5bd3)}

@media(max-width:767px){
	/* Bỏ khoảng trống đầu trang */
	body .g3 .g-hero .breadcrumbs,body .xp .x-hero .breadcrumbs,body .app2d .a-hero .breadcrumbs{display:none}
	body .g3 .g-hero,body .xp .x-hero,body .app2d .a-hero{padding-top:18px;padding-bottom:24px}
	body .g3 .g-hero-grid,body .xp .x-hero-grid,body .app2d .a-hero-grid{gap:22px}
	body .g3 h1,body .xp h1,body .app2d h1{margin:8px 0 12px}
	body .g3 section,body .xp section,body .app2d section{padding-top:22px;padding-bottom:22px}
	body .g3 .g-head{margin-bottom:16px}

	/* Ô tính năng: icon nằm cạnh tiêu đề, đệm nhỏ, không dàn trải */
	body .g3 .g-grid,body .app2d .a-grid,body .xp .x-feats{gap:10px}
	body .g3 .g-card,body .app2d .a-card,body .xp .x-feat{display:grid;grid-template-columns:36px minmax(0,1fr);column-gap:12px;align-items:center;padding:14px;border-radius:14px}
	body .g3 .g-card i,body .app2d .a-card i,body .xp .x-feat i{width:36px;height:36px;border-radius:10px;font-size:15px}
	body .g3 .g-card h3,body .app2d .a-card h3,body .xp .x-feat h3{margin:0;font-size:16px;line-height:1.3}
	body .g3 .g-card p,body .app2d .a-card p,body .xp .x-feat p{grid-column:1/-1;margin-top:6px;font-size:14px;line-height:1.5}

	/* Ô dòng game */
	body .g3 .g-games{gap:10px}
	body .g3 .g-game{padding:14px 16px;border-radius:14px}
	body .g3 .g-game b{margin-bottom:4px;font-size:16px}
	body .g3 .g-game span{font-size:14px;line-height:1.5}
}

/* ==========================================================================
   Chân trang gọn trên di động
   ========================================================================== */
@media(max-width:767px){
	.footer-main{padding:26px 0 16px}
	.footer-grid{grid-template-columns:1fr;gap:18px}
	/* Logo + mạng xã hội chung một hàng, mô tả ngắn gọn bên dưới */
	.footer-brand{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px}
	.footer-brand>p{order:3;flex:1 0 100%;max-width:none;margin:0;font-size:.8rem;line-height:1.5}
	.footer-socials a{width:34px;height:34px}
	/* Tiêu đề cột nhỏ, liên kết xếp 2 cột */
	.footer-column h2{margin-bottom:8px;font-size:.9rem}
	.footer-column:not(.footer-contact) ul{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}
	.footer-column li{margin-bottom:0}
	.footer-column:not(.footer-contact) a{display:block;padding:5px 0;font-size:.82rem;line-height:1.35}
	/* Cột chỉ có một liên kết (vd. "Dịch vụ → HOME") thì ẩn */
	.footer-column:not(.footer-contact):has(li:only-child){display:none}
	/* Liên hệ */
	.footer-contact li{margin-bottom:6px;gap:8px;font-size:.82rem;line-height:1.45}
	.footer-contact li:last-child{margin-bottom:0}
	.footer-contact a{font-size:.82rem}
	/* Dải cuối: bỏ câu khẩu hiệu, giữ bản quyền + chính sách */
	.footer-bottom .sk-container{padding:10px 0 12px;gap:2px}
	.footer-bottom .sk-container>p:last-child{display:none}
	.footer-policies{margin:2px 0}
}

/* Form "Nhận tư vấn phương án" (trang dịch vụ) gọn trên di động */
@media(max-width:767px){
	body .sn-service-lead-card{padding:16px 14px;border-radius:18px}
	body .sn-service-lead-card h3{margin:0 0 4px;font-size:21px;line-height:1.2}
	body .sn-service-lead-card>p{margin:0 0 12px;font-size:13.5px;line-height:1.5}
	body .sn-service-lead-form{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 10px}
	body .sn-service-lead-form>*{grid-column:1/-1}
	body .sn-service-lead-form>label:nth-of-type(1),body .sn-service-lead-form>label:nth-of-type(2){grid-column:auto}
	body .sn-service-form-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
	body .sn-service-lead-form label>span{margin-bottom:3px}
	body .sn-service-lead-form input,body .sn-service-lead-form textarea{padding:8px 11px;font-size:16px;line-height:1.35}
	body .sn-service-lead-form textarea{height:72px;min-height:72px}
	body .sn-service-lead-form button{min-height:44px;margin-top:2px;padding-top:10px;padding-bottom:10px}
}

@media(max-width:359px){
	.service-grid,body .sn-service-problem-grid,body .sn-service-benefit-grid,body .sn-service-process-grid,body .sn-about-timeline-simple,body .sn-about-team-cards-simple,body .sn-about-process-orbit,body .pl .pl-feats{grid-template-columns:1fr}
}
