/* ==========================================================================
   AN PHAT WINDOOR - UNIVERSAL SERVICE PAGES & GUTENBERG CONTENT STYLING
   Khóa cứng theo DESIGN.md: Font Roboto, Màu thương hiệu #0e51d1, Tương phản cao
   Áp dụng đồng bộ cho mọi trang Dịch Vụ, Bài Viết, Bảng Giá và Landing Pages
   ========================================================================== */

/* 1. TYPOGRAPHY & HEADING HIERARCHY TRÊN NỘI DUNG */
.entry-content,
.wp-block-post-content,
.apw-content-wrap,
main.wp-block-group {
	font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
	font-size: 16px;
	line-height: 1.65;
	color: #282828;
}

.entry-content h1,
.wp-block-post-content h1,
h1.apw-page-title,
.apw-hero-title {
	font-size: 26px !important;
	line-height: 1.35 !important;
	font-weight: 700 !important;
	color: #0a3d91 !important;
	margin-top: 0 !important;
	margin-bottom: 12px !important;
	letter-spacing: -0.3px;
}

@media (min-width: 768px) {
	.entry-content h1,
	.wp-block-post-content h1,
	h1.apw-page-title,
	.apw-hero-title {
		font-size: 32px !important;
		line-height: 1.3 !important;
	}
}

.entry-content h2,
.wp-block-post-content h2,
.apw-section-h2 {
	font-size: 20px !important;
	line-height: 1.4 !important;
	font-weight: 700 !important;
	color: #0e51d1 !important;
	margin-top: 2rem !important;
	margin-bottom: 1rem !important;
	padding-left: 14px !important;
	border-left: 4px solid #0e51d1 !important;
	position: relative;
}

/* Exclude dedicated landing pages from article border-left & padding */
.apw-landing-page h1,
.apw-landing-page h2,
.apw-landing-page h3,
.stitch-page h1,
.stitch-page h2,
.stitch-page h3 {
	border-left: none !important;
	padding-left: 0 !important;
}

@media (min-width: 768px) {
	.entry-content h2,
	.wp-block-post-content h2,
	.apw-section-h2 {
		font-size: 23px !important;
		line-height: 1.35 !important;
	}
}

.entry-content h3,
.wp-block-post-content h3,
.apw-section-h3 {
	font-size: 18px !important;
	line-height: 1.45 !important;
	font-weight: 700 !important;
	color: #0a3d91 !important;
	margin-top: 1.5rem !important;
	margin-bottom: 0.75rem !important;
}

.entry-content p,
.wp-block-post-content p {
	font-size: 16px;
	line-height: 1.65;
	color: #282828;
	margin-bottom: 1.1rem;
}

.entry-content strong,
.wp-block-post-content strong {
	font-weight: 700;
	color: #0a0a0a;
}

.entry-content ul,
.wp-block-post-content ul,
.entry-content ol,
.wp-block-post-content ol {
	padding-left: 1.5rem;
	margin-bottom: 1.25rem;
}

.entry-content li,
.wp-block-post-content li {
	margin-bottom: 0.5rem;
	line-height: 1.6;
}

/* 2. BẢNG BÁO GIÁ MINH BẠCH - CHỐNG TRÀN NGANG MOBILE */
.wp-block-table,
figure.wp-block-table,
.entry-content table,
.wp-block-post-content table {
	width: 100% !important;
	max-width: 100% !important;
	margin: 1.5rem 0 !important;
	border-collapse: collapse !important;
	background: #ffffff !important;
	border: 1px solid #e5e7eb !important;
	border-radius: 8px !important;
	overflow: hidden !important;
	display: block !important;
	overflow-x: auto !important;
	-webkit-overflow-scrolling: touch !important;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

figure.wp-block-table table {
	display: table !important;
	width: 100% !important;
	border: none !important;
	margin: 0 !important;
	box-shadow: none !important;
}

.entry-content table th,
.wp-block-post-content table th,
.wp-block-table th {
	background: #0e51d1 !important;
	color: #ffffff !important;
	font-weight: 700 !important;
	font-size: 15px !important;
	padding: 12px 14px !important;
	text-align: left !important;
	border: 1px solid #0a3d91 !important;
	white-space: nowrap !important;
}

.entry-content table td,
.wp-block-post-content table td,
.wp-block-table td {
	padding: 12px 14px !important;
	font-size: 15px !important;
	line-height: 1.5 !important;
	color: #1f2937 !important;
	border: 1px solid #e5e7eb !important;
	vertical-align: middle !important;
}

.entry-content table tr:nth-child(even),
.wp-block-post-content table tr:nth-child(even),
.wp-block-table tr:nth-child(even) {
	background: #f8f9fa !important;
}

.entry-content table tr:hover,
.wp-block-post-content table tr:hover,
.wp-block-table tr:hover {
	background: #f0f7ff !important;
}

/* Badge giá và khuyến mãi trong bảng */
.apw-price-highlight {
	color: #0e51d1;
	font-weight: 700;
	font-size: 16px;
}

.apw-badge-rec {
	display: inline-block;
	background: #ebf2f5;
	color: #0a3d91;
	font-size: 12px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 4px;
	margin-left: 6px;
	border: 1px solid #bfdbfe;
}

/* 3. HERO BANNER CHUẨN GOOGLE STITCH */
.apw-service-hero {
	background: linear-gradient(135deg, #0a3d91 0%, #0e51d1 100%);
	color: #ffffff;
	padding: 2.5rem 1rem;
	border-radius: 0 0 16px 16px;
	margin-bottom: 2rem;
	position: relative;
	overflow: hidden;
}

@media (min-width: 768px) {
	.apw-service-hero {
		padding: 3.5rem 2rem;
		margin-bottom: 2.5rem;
	}
}

.apw-service-hero .apw-hero-breadcrumb {
	font-size: 13.5px !important;
	color: rgba(255, 255, 255, 0.8) !important;
	margin-bottom: 12px !important;
}

.apw-service-hero .apw-hero-breadcrumb a {
	color: #ffffff !important;
	text-decoration: underline !important;
}

.apw-service-hero .apw-hero-breadcrumb span {
	color: #93c5fd !important;
}

.apw-service-hero .apw-hero-subtitle {
	color: rgba(255, 255, 255, 0.92) !important;
	font-size: 16px !important;
	line-height: 1.6 !important;
	max-width: 860px !important;
	margin-bottom: 20px !important;
}

.apw-service-hero .wp-block-buttons {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 12px !important;
	margin-top: 18px !important;
}

.apw-service-hero .apw-btn-primary .wp-block-button__link {
	background-color: #ffffff !important;
	color: #0e51d1 !important;
	font-weight: 700 !important;
	border-radius: 6px !important;
	padding: 12px 24px !important;
	border: none !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
	transition: all 0.2s ease !important;
	text-decoration: none !important;
}

.apw-service-hero .apw-btn-primary .wp-block-button__link:hover {
	background-color: #f0f7ff !important;
	color: #0a3d91 !important;
	transform: translateY(-1px) !important;
}

.apw-service-hero .apw-btn-outline .wp-block-button__link {
	background-color: transparent !important;
	color: #ffffff !important;
	font-weight: 600 !important;
	border-radius: 6px !important;
	padding: 12px 24px !important;
	border: 1px solid rgba(255, 255, 255, 0.6) !important;
	transition: all 0.2s ease !important;
	text-decoration: none !important;
}

.apw-service-hero .apw-btn-outline .wp-block-button__link:hover {
	background-color: rgba(255, 255, 255, 0.15) !important;
	border-color: #ffffff !important;
}

.apw-service-hero .apw-hero-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(255, 255, 255, 0.15);
	color: #ffffff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.5px;
	padding: 4px 14px;
	border-radius: 20px;
	margin-bottom: 14px;
	border: 1px solid rgba(255, 255, 255, 0.25);
}

.apw-service-hero h1 {
	color: #ffffff !important;
	font-size: 28px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	margin-bottom: 12px !important;
}

@media (min-width: 768px) {
	.apw-service-hero h1 {
		font-size: 36px !important;
	}
}

.apw-service-hero p.apw-hero-desc {
	color: rgba(255, 255, 255, 0.92);
	font-size: 16px;
	line-height: 1.6;
	max-width: 820px;
	margin-bottom: 20px;
}

.apw-hero-btn-group {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

.apw-hero-btn-primary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #ffffff;
	color: #0e51d1 !important;
	font-weight: 700;
	font-size: 15px;
	padding: 12px 24px;
	border-radius: 6px;
	text-decoration: none !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	transition: all 0.2s ease;
}

.apw-hero-btn-primary:hover {
	background: #f8f9fa;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.apw-hero-btn-outline {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	color: #ffffff !important;
	font-weight: 600;
	font-size: 15px;
	padding: 12px 22px;
	border-radius: 6px;
	border: 1.5px solid rgba(255, 255, 255, 0.7);
	text-decoration: none !important;
	transition: all 0.2s ease;
}

.apw-hero-btn-outline:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: #ffffff;
}

/* 4. CALLOUT BOX & THÔNG SỐ VẬT TƯ */
.apw-callout-box {
	background: #ebf2f5;
	border-left: 4px solid #0e51d1;
	border-radius: 0 8px 8px 0;
	padding: 18px 20px;
	margin: 1.5rem 0;
}

.apw-callout-box p:last-child {
	margin-bottom: 0;
}

.apw-spec-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	margin: 1.5rem 0;
}

@media (min-width: 640px) {
	.apw-spec-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.apw-spec-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.apw-spec-card {
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 18px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
	transition: all 0.2s ease;
}

.apw-spec-card:hover {
	border-color: #0e51d1;
	box-shadow: 0 6px 16px rgba(14, 81, 209, 0.08);
}

.apw-spec-card-title {
	font-size: 16px;
	font-weight: 700;
	color: #0a3d91;
	margin-bottom: 6px;
}

.apw-spec-card-desc {
	font-size: 14px;
	color: #4b5563;
	line-height: 1.5;
	margin-bottom: 0;
}

/* 5. THƯ VIỆN ẢNH THỰC TẾ XƯỞNG & CÔNG TRÌNH */
.wp-block-gallery,
.apw-gallery-grid {
	display: grid !important;
	grid-template-columns: 1fr !important;
	gap: 16px !important;
	margin: 1.5rem 0 !important;
	padding: 0 !important;
}

@media (min-width: 640px) {
	.wp-block-gallery,
	.apw-gallery-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (min-width: 1024px) {
	.wp-block-gallery,
	.apw-gallery-grid {
		grid-template-columns: repeat(3, 1fr) !important;
	}
}

.wp-block-gallery figure,
.apw-gallery-grid .apw-gallery-item {
	margin: 0 !important;
	border-radius: 8px !important;
	overflow: hidden !important;
	background: #f8f9fa !important;
	border: 1px solid #e5e7eb !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
	transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.wp-block-gallery figure:hover,
.apw-gallery-grid .apw-gallery-item:hover {
	transform: translateY(-2px) !important;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1) !important;
}

.wp-block-gallery img,
.apw-gallery-grid img {
	width: 100% !important;
	height: 220px !important;
	object-fit: cover !important;
	display: block !important;
}

.wp-block-gallery figcaption,
.apw-gallery-grid .apw-gallery-caption {
	font-size: 13px !important;
	color: #4b5563 !important;
	padding: 8px 12px !important;
	text-align: center !important;
	background: #ffffff !important;
	border-top: 1px solid #f0f0f0 !important;
}

/* 6. QUY TRÌNH THI CÔNG 5 BƯỚC */
.apw-process-steps {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	margin: 1.5rem 0;
}

@media (min-width: 768px) {
	.apw-process-steps {
		grid-template-columns: repeat(5, 1fr);
	}
}

.apw-process-step {
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 18px 14px;
	text-align: center;
	position: relative;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.apw-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	background: #0e51d1;
	color: #ffffff;
	font-weight: 700;
	font-size: 16px;
	border-radius: 50%;
	margin-bottom: 10px;
}

.apw-step-title {
	font-size: 15px;
	font-weight: 700;
	color: #0a3d91;
	margin-bottom: 6px;
}

.apw-step-desc {
	font-size: 13px;
	color: #6b7280;
	line-height: 1.45;
	margin-bottom: 0;
}

/* 7. FAQ ACCORDION GIẢI ĐÁP */
details.wp-block-details,
.apw-faq-card {
	background: #f8f9fa !important;
	border: 1px solid #e5e7eb !important;
	border-radius: 8px !important;
	margin-bottom: 12px !important;
	padding: 14px 18px !important;
	transition: background 0.2s ease !important;
}

details.wp-block-details[open],
.apw-faq-card.active {
	background: #ffffff !important;
	border-color: #0e51d1 !important;
	box-shadow: 0 4px 12px rgba(14, 81, 209, 0.06) !important;
}

details.wp-block-details summary {
	font-weight: 700 !important;
	font-size: 16px !important;
	color: #0a3d91 !important;
	cursor: pointer !important;
	outline: none !important;
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
}

details.wp-block-details p {
	font-size: 15px !important;
	color: #374151 !important;
	line-height: 1.6 !important;
	margin-top: 12px !important;
	margin-bottom: 0 !important;
	padding-top: 10px !important;
	border-top: 1px dashed #e5e7eb !important;
}

/* 8. CTA LIÊN HỆ ĐỒNG BỘ CUỐI TRANG */
.apw-cta-box {
	background: #0e51d1;
	color: #ffffff;
	border-radius: 12px;
	padding: 32px 20px;
	text-align: center;
	margin: 2.5rem 0 1.5rem 0;
	box-shadow: 0 10px 25px rgba(14, 81, 209, 0.2);
}

.apw-cta-box h3 {
	color: #ffffff !important;
	font-size: 22px !important;
	font-weight: 700 !important;
	margin-bottom: 8px !important;
}

@media (min-width: 768px) {
	.apw-cta-box h3 {
		font-size: 26px !important;
	}
}

.apw-cta-box p {
	color: rgba(255, 255, 255, 0.9) !important;
	font-size: 15px !important;
	max-width: 600px;
	margin: 0 auto 20px auto !important;
}

.apw-cta-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
}

.apw-cta-phone-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #ffffff;
	color: #0e51d1 !important;
	font-weight: 700;
	font-size: 16px;
	padding: 12px 24px;
	border-radius: 6px;
	text-decoration: none !important;
	transition: all 0.2s ease;
}

.apw-cta-phone-btn:hover {
	background: #f8f9fa;
	transform: scale(1.02);
}

.apw-cta-form-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #0a3d91;
	color: #ffffff !important;
	font-weight: 700;
	font-size: 16px;
	padding: 12px 24px;
	border-radius: 6px;
	text-decoration: none !important;
	border: 1px solid rgba(255, 255, 255, 0.4);
	transition: all 0.2s ease;
}

.apw-cta-form-btn:hover {
	background: #082f70;
	border-color: #ffffff;
}

/* 9. AUTHOR E-E-A-T CARD */
.apw-author-eeat-card {
	display: flex;
	flex-direction: column;
	gap: 16px;
	background: #f8f9fa;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 20px;
	margin: 2rem 0;
}

@media (min-width: 640px) {
	.apw-author-eeat-card {
		flex-direction: row;
		align-items: center;
	}
}

.apw-author-avatar {
	width: 90px;
	height: 90px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid #0e51d1;
	flex-shrink: 0;
}

.apw-author-info h4 {
	font-size: 17px;
	font-weight: 700;
	color: #0a3d91;
	margin: 0 0 4px 0;
}

.apw-author-title {
	font-size: 13px;
	font-weight: 600;
	color: #0e51d1;
	margin-bottom: 8px;
}

.apw-author-bio {
	font-size: 14px;
	color: #4b5563;
	line-height: 1.5;
	margin: 0;
}


/* ==========================================================================
   ROBUST RESPONSIVE GRID & UTILITIES FOR STITCH SERVICE PAGES
   ========================================================================== */
.apw-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}
@media (min-width: 1024px) {
    .apw-hero-grid {
        grid-template-columns: 7fr 5fr;
    }
}

.apw-commitments-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 768px) {
    .apw-commitments-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.apw-specs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 640px) {
    .apw-specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .apw-specs-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.apw-gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 640px) {
    .apw-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .apw-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.apw-process-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 768px) {
    .apw-process-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Tailwind Responsive Breakpoint Helpers */
@media (min-width: 1024px) {
    .lg\:grid-cols-12 {
        display: grid !important;
        grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    }
    .lg\:col-span-7 {
        grid-column: span 7 / span 7 !important;
    }
    .lg\:col-span-5 {
        grid-column: span 5 / span 5 !important;
    }
    .lg\:col-span-8 {
        grid-column: span 8 / span 8 !important;
    }
    .lg\:col-span-4 {
        grid-column: span 4 / span 4 !important;
    }
    .lg\:grid-cols-3 {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
    .lg\:grid-cols-4 {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}
@media (min-width: 768px) {
    .md\:grid-cols-3 {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
    .md\:grid-cols-5 {
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
    .md\:grid-cols-2 {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
@media (min-width: 640px) {
    .sm\:grid-cols-2 {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .sm\:grid-cols-3 {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}
