/* Final template system layer.
   Loaded after product/service group CSS so shared layout rules stay central. */

/* Sitewide visual safety net: content must never disappear or turn white on light sections. */
.js-ready .reveal,
.js-ready :is(.reveal-delay-1, .reveal-delay-2, .reveal-delay-3, .reveal-delay-4, .reveal-delay-5) {
  opacity: 1 !important;
  transform: none !important;
  transition-delay: 0s !important;
}

body :is(main, .site-main) :is(.section, .archive-listing, .related-section, .faq-section, .project-section, .news-section, .contact-section) {
  color: var(--kp-text, #243126);
}

body :is(main, .site-main) :is(.section, .archive-listing, .related-section, .faq-section, .project-section, .news-section, .contact-section) :is(.section-title, h2, h3, h4) {
  color: var(--kp-dark, #002611);
}

body :is(main, .site-main) :is(.section, .archive-listing, .related-section, .faq-section, .project-section, .news-section, .contact-section) :is(.section-subtitle, p, li, td, th) {
  color: inherit;
}

body :is(.hero, .service-hero, .garden-hero, .golf-hero, .contact-hero, .news-hero, .project-hero, .archive-hero, .why-section, .quote-block, .mid-cta, footer, .site-footer) {
  color: #fff;
}

body :is(.hero, .service-hero, .garden-hero, .golf-hero, .contact-hero, .news-hero, .project-hero, .archive-hero, .why-section, .quote-block, .mid-cta, footer, .site-footer) :is(.section-title, h1, h2, h3, h4) {
  color: #fff;
}

body :is(.hero, .service-hero, .garden-hero, .golf-hero, .contact-hero, .news-hero, .project-hero, .archive-hero, .why-section, .quote-block, .mid-cta, footer, .site-footer) :is(.section-subtitle, p, li) {
  color: rgba(255, 255, 255, .84);
}

body :is(.card, .service-card, .spec-card, .post-card, .related-card, .faq-item, .quote-panel, .form-panel, .trust-item, .benefit-item, .process-card, .problem-card, .answer-card, .intent-card, .cost-card, .scenario-card, .maintenance-card, .warranty-box, .testimonial-card) {
  color: var(--kp-text, #243126);
}

body :is(.card, .service-card, .spec-card, .post-card, .related-card, .faq-item, .quote-panel, .form-panel, .trust-item, .benefit-item, .process-card, .problem-card, .answer-card, .intent-card, .cost-card, .scenario-card, .maintenance-card, .warranty-box, .testimonial-card) :is(h2, h3, h4, strong, b) {
  color: var(--kp-dark, #002611);
}

body :is(.card, .service-card, .spec-card, .post-card, .related-card, .faq-item, .quote-panel, .form-panel, .trust-item, .benefit-item, .process-card, .problem-card, .answer-card, .intent-card, .cost-card, .scenario-card, .maintenance-card, .warranty-box, .testimonial-card) :is(p, li, span, td, th) {
  color: inherit;
}

/* Quote/form layout safety for responsive and print-like rendering. */
body :is(.quote-block, .mid-cta) {
  min-width: 0 !important;
}

body :is(.quote-block, .mid-cta) > * {
  min-width: 0 !important;
}

body :is(.quote-block, .mid-cta) :is(h1, h2, h3, p, li, span, strong, b) {
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  body :is(.quote-block, .mid-cta, .quote-grid) {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 720px) {
  body :is(.quote-block, .mid-cta) {
    padding: 24px 18px !important;
    border-radius: 22px !important;
    gap: 20px !important;
  }

  body :is(.quote-block, .mid-cta) :is(.quote-panel, .quote-right, .form-panel) {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Final contrast locks for mixed legacy service templates. */
body :is(.mid-cta, .quote-block) {
  position: relative !important;
  overflow: hidden !important;
  background: radial-gradient(circle at 88% 18%, rgba(255, 177, 92, .30), transparent 26%), linear-gradient(135deg, #041f10 0%, #004c24 54%, #5a2a12 100%) !important;
  color: #fff !important;
}

body :is(.mid-cta, .quote-block) > :not(.quote-panel):not(.form-panel):not(.quote-right):not(.btn),
body :is(.mid-cta, .quote-block) > :not(.quote-panel):not(.form-panel):not(.quote-right):not(.btn) :is(h1, h2, h3, h4, strong, b) {
  color: #fff !important;
}

body :is(.mid-cta, .quote-block) > :not(.quote-panel):not(.form-panel):not(.quote-right):not(.btn) :is(p, li, span) {
  color: rgba(255, 255, 255, .88) !important;
}

body.page-template-page-co-nhan-tao-san-golf .golf-quote > :not(.golf-quote-panel):not(.golf-form-panel) :is(h2, strong, b) {
  color: #fff !important;
}

body.page-template-page-co-nhan-tao-san-golf .golf-quote > :not(.golf-quote-panel):not(.golf-form-panel) :is(p, li, span) {
  color: rgba(255, 255, 255, .9) !important;
}

body :is(.mid-cta, .quote-block) .btn-yellow {
  color: #102016 !important;
}

body :is(.mid-cta, .quote-block) > a.btn.btn-yellow {
  color: #102016 !important;
}

body :is(.quote-panel, .form-panel, .quote-right) {
  background: #fff !important;
  color: var(--kp-text, #243126) !important;
}

body :is(.quote-panel, .form-panel, .quote-right) :is(h1, h2, h3, h4, strong, b) {
  color: var(--kp-dark, #002611) !important;
}

body :is(.quote-panel, .form-panel, .quote-right) :is(p, li, span, label, small) {
  color: var(--kp-text, #243126) !important;
}

body :is(.service-hero, .hero) .mini-stat {
  background: rgba(255, 255, 255, .96) !important;
  color: var(--kp-text, #243126) !important;
}

body :is(.service-hero, .hero) .mini-stat strong {
  color: var(--kp-dark, #002611) !important;
}

body :is(.service-hero, .hero) .mini-stat span {
  color: var(--kp-muted, #526057) !important;
}

body :is(main, .site-main) table th {
  color: #fff !important;
}

body :is(main, .site-main) table th :is(span, strong, b) {
  color: inherit !important;
}

body .callout {
  color: #4c3a00 !important;
}

body .callout :is(p, li, span) {
  color: #4c3a00 !important;
}

body .callout :is(strong, b, h3, h4) {
  color: #2d2200 !important;
}

body .callout :is(.trust-icon, .card-icon, .step-num) {
  background: linear-gradient(135deg, var(--kp-green, #0a6b2f), #72bd20) !important;
  border-color: rgba(10, 107, 47, .22) !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(10, 107, 47, .18) !important;
}

body:is(.page-template-page-thi-cong-san-bong-co-nhan-tao, .page-template-page-thi-cong-san-vuon-co-nhan-tao, .page-template-page-thi-cong-san-bong-ro, .page-template-page-thi-cong-san-pickleball, .page-template-page-thi-cong-duong-chay-dien-kinh, .page-template-page-thi-cong-to-hop-san-the-thao, .page-template-page-bao-tri-san-co-nhan-tao) .callout :is(.trust-icon, .card-icon, .step-num) {
  background: linear-gradient(135deg, var(--kp-green, #0a6b2f), #72bd20) !important;
  border-color: rgba(10, 107, 47, .22) !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(10, 107, 47, .18) !important;
}

body .service-featured-badge {
  color: #fff !important;
}

body .btn.btn-yellow,
body a.btn.btn-yellow {
  color: #102016 !important;
}

body .quote-stars {
  color: #8a6500 !important;
}

.kp-showcase-card {
  background: linear-gradient(135deg, #064b25, #0a6b2f 54%, #11351d) !important;
}

.kp-showcase-card::after {
  background: linear-gradient(180deg, rgba(0, 0, 0, .08) 20%, rgba(0, 30, 12, .78)) !important;
}
