/* ==================================================
📁 home.css – Style riêng cho trang front-page
Theme: NgTheVinh
Scope: chỉ áp dụng cho template front-page.php
================================================== */

body:is(.page-template-front-page-php,.front-page) .front-page {
  width: 100%;
  padding-bottom: 0;
}

/* ================================================
📌 0. SECTION WRAPPER – nền & spacing dùng chung
================================================== */
body:is(.page-template-front-page-php,.front-page) .section-block {
  padding: 6.25rem 0 7.25rem 0;
}

body:is(.page-template-front-page-php,.front-page) .section-bg--white {
  background: #ffffff;
}

body:is(.page-template-front-page-php,.front-page) .section-bg--gray {
  background: #f3f4f6;
}

body:is(.page-template-front-page-php,.front-page) .section-content {
  margin-top: 2rem;
}

/* Avatar testimonials nhô lên */
body:is(.page-template-front-page-php,.front-page) .section-content--lifted {
  margin-top: calc(2rem + 60px);
}

/* ================================================
📌 1. HERO
================================================== */
body:is(.page-template-front-page-php,.front-page) .home-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;

  background-image: var(--hero-desktop);
}

body:is(.page-template-front-page-php,.front-page) .home-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}

body:is(.page-template-front-page-php,.front-page) .home-hero .container {
  position: relative;
  z-index: 2;
}

body:is(.page-template-front-page-php,.front-page) .home-hero-content {
  max-width: 720px;
  padding: 4rem 0;
  color: #fff;
}

body:is(.page-template-front-page-php,.front-page) .home-hero-title {
  font-size: 2.4rem;
  line-height: 1.15;
  margin: 0 0 1rem;
  font-weight: 800;
}

body:is(.page-template-front-page-php,.front-page) .home-hero-desc {
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

/* ✅ NEW: hiển thị đúng text theo breakpoint */
body:is(.page-template-front-page-php,.front-page) .hero-text--desktop {
  display: block;
}

.home-hero-desc p {
	font-size: 1.25rem;
}

body:is(.page-template-front-page-php,.front-page) .hero-text--tablet,
body:is(.page-template-front-page-php,.front-page) .hero-text--mobile {
  display: none;
}

/* ✅ NEW: Hero boxed mode */
body:is(.page-template-front-page-php,.front-page) .home-hero--boxed {
  min-height: auto;
  padding: 3.25rem 0;
  background: transparent;
}

body:is(.page-template-front-page-php,.front-page) .home-hero-boxed {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: min(560px, 72vh);
  border-radius: 1.125rem;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-image: var(--hero-desktop);
}

body:is(.page-template-front-page-php,.front-page) .home-hero--boxed .home-hero-overlay {
  z-index: 1;
}

body:is(.page-template-front-page-php,.front-page) .home-hero--boxed .home-hero-content {
  position: relative;
  z-index: 2;
  padding: 4rem 2rem;
}

/* ================================================
📌 2. SECTION HEADER
================================================== */
body:is(.page-template-front-page-php,.front-page) .section-title {
  text-align: center;
  margin: 1.25rem 0 0.3125rem 0;}

body:is(.page-template-front-page-php,.front-page) .section-subtitle {
  text-align: center;
  margin: 0 auto;
  max-width: 720px;
  color: #999;
}

/* ================================================
📌 3. FEATURED
================================================== */
body:is(.page-template-front-page-php,.front-page) .home-featured-grid .design-title {
  margin: 0.85rem 0 0;
  font-size: 1rem;
  text-align: center;
}

/* ================================================
📌 4. SERVICES – Slider dịch vụ
================================================== */
body:is(.page-template-front-page-php,.front-page) .home-services-slider {
  position: relative;
  margin-top: 4rem;
}

h3.services-title {
  font-size: 1.5rem;
  margin-top: 0;
}
.services-desc {
  margin: 1.25rem 0;
}

body:is(.page-template-front-page-php,.front-page) .services-nav {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

body:is(.page-template-front-page-php,.front-page) .services-nav span {
  font-size: 28px;
  line-height: 1;
  color: #111827;
}

/* ✅ FIX: trạng thái disabled ở giới hạn (đầu/cuối) */
body:is(.page-template-front-page-php,.front-page) .services-nav[disabled],
body:is(.page-template-front-page-php,.front-page) .services-nav[aria-disabled="true"] {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}

body:is(.page-template-front-page-php,.front-page) .services-prev {
  left: 50%;
  transform: translate(-50%, -50%) translateX(-600px) translateX(-30px);
}

body:is(.page-template-front-page-php,.front-page) .services-next {
  left: 50%;
  transform: translate(-50%, -50%) translateX(600px) translateX(30px);
}

@media (max-width: 1240px) {
  body:is(.page-template-front-page-php,.front-page) .services-prev {
    left: 30px;
    transform: translateY(-50%);
  }

  body:is(.page-template-front-page-php,.front-page) .services-next {
    right: 30px;
    left: auto;
    transform: translateY(-50%);
  }
}

body:is(.page-template-front-page-php,.front-page) .services-slider-viewport {
  overflow: hidden;
}

body:is(.page-template-front-page-php,.front-page) .services-slider-track {
  display: flex;
  transition: transform 0.35s ease;
}

body:is(.page-template-front-page-php,.front-page) .services-slide {
  flex: 0 0 100%;
}

body:is(.page-template-front-page-php,.front-page) .services-slide-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  background: #ffffff;
  overflow: hidden;
  border-radius: 0.3125rem;
  position: relative;
  min-height: 360px;
}

body:is(.page-template-front-page-php,.front-page) .services-media {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body:is(.page-template-front-page-php,.front-page) .services-media img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  border-radius: 0;
  display: block;
}

body:is(.page-template-front-page-php,.front-page) .services-content {
  padding: 2.5rem 2.5rem 2.5rem 0;
}

/* ================================================
📌 5. STRENGTHS – Thế mạnh của chúng tôi
================================================== */
body:is(.page-template-front-page-php,.front-page) .section-block-strengths {
  padding: 3.25rem 0 0 0;
}

body:is(.page-template-front-page-php,.front-page) .home-strengths {
  position: relative;
}

body:is(.page-template-front-page-php,.front-page) .strength-stage {
  position: relative;
  margin-top: 2.25rem;
  min-height: 520px;
}

body:is(.page-template-front-page-php,.front-page) .strength-stage::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 42%;
  height: 100%;
  background-image: var(--strengthbg);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: right bottom;
  z-index: 1;
  pointer-events: none;
}

body:is(.page-template-front-page-php,.front-page) .strength-board {
  position: relative;
  z-index: 2;
  width: 72%;
  margin: 0;
  padding-top: 1.25rem;

  --polew: 1rem;
  --rowgap: 2.125rem;

  --iconw: 5rem;
  --tip: 2.75rem;

  --pady: 1rem;
  --padx: 1.125rem;

  --maxbody: 520px;

  --pole: #ff8b55;

  --orange: #f26b3a;
  --orange2: #f0824d;
  --red: #c91f1f;
}

body:is(.page-template-front-page-php,.front-page) .poleflow {
  position: relative;
  display: grid;
  grid-template-columns: 1fr var(--polew) 1fr;
  column-gap: 0;
  row-gap: var(--rowgap);
  align-items: center;
  padding: 2.5rem 0 4.375rem 0;
  min-height: 460px;
  z-index: 2;
}

body:is(.page-template-front-page-php,.front-page) .poleflow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: var(--polew);
  transform: translateX(-50%);
  background: var(--secondary-color);
  border-radius: 6px 6px 0 0;
  z-index: 1;
}

body:is(.page-template-front-page-php,.front-page) .poleflow::after {
  content: "";
  position: absolute;
  left: calc(50% - (var(--polew) / 2) + 3px);
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--primary-color);
  border-radius: 4px 4px 0 0;
  opacity: 0.7;
  z-index: 1;
}

body:is(.page-template-front-page-php,.front-page) .slot-left {
  grid-column: 1 / 2;
  justify-self: end;
  display: flex;
  justify-content: flex-end;
  padding: 0;
  margin: 0;
  z-index: 2;
}

body:is(.page-template-front-page-php,.front-page) .slot-right {
  grid-column: 3 / 4;
  justify-self: start;
  display: flex;
  justify-content: flex-start;
  padding: 0;
  margin: 0;
  z-index: 2;
}

body:is(.page-template-front-page-php,.front-page) .strength-item {
  display: flex;
  align-items: stretch;
  width: fit-content;
  max-width: 100%;
  margin: 0;
}

body:is(.page-template-front-page-php,.front-page) .item-icon {
  width: var(--iconw);
  flex: 0 0 var(--iconw);
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

body:is(.page-template-front-page-php,.front-page) .icon-circle {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
}

body:is(.page-template-front-page-php,.front-page) .icon-circle i {
  display: inline-block;
  line-height: 1;
}

body:is(.page-template-front-page-php,.front-page) .item-body {
  background: var(--secondary-color);
  color: #ffffff;
  display: flex;
  align-items: center;
  width: fit-content;
  max-width: var(--maxbody);
}

body:is(.page-template-front-page-php,.front-page) .item-body-inner {
  padding: var(--pady) var(--padx);
  line-height: 1.5;
  white-space: normal;
}

body:is(.page-template-front-page-php,.front-page) .strength-item.is-left {
  flex-direction: row;
}

body:is(.page-template-front-page-php,.front-page) .strength-item.is-left .item-body {
  clip-path: polygon(0 50%, var(--tip) 0, 100% 0, 100% 100%, var(--tip) 100%);
  padding-left: 1.25rem;
}

body:is(.page-template-front-page-php,.front-page) .strength-item.is-left .item-body-inner {
  padding-left: calc(var(--padx) + 12px);
  padding-right: var(--padx);
  text-align: left;
}

body:is(.page-template-front-page-php,.front-page) .strength-item.is-right {
  flex-direction: row;
}

body:is(.page-template-front-page-php,.front-page) .strength-item.is-right .item-body {
  clip-path: polygon(0 0, calc(100% - var(--tip)) 0, 100% 50%, calc(100% - var(--tip)) 100%, 0 100%);
  padding-right: 1.25rem;
}

body:is(.page-template-front-page-php,.front-page) .strength-item.is-right .item-body-inner {
  padding-right: calc(var(--padx) + 12px);
  padding-left: var(--padx);
}

body:is(.page-template-front-page-php,.front-page) .strength-mobile {
  display: none;
  margin-top: 2.25rem;
  width: min(720px, 92%);
  margin-left: auto;
  margin-right: auto;
}

body:is(.page-template-front-page-php,.front-page) .strength-mobile .m-item {
  /* Mobile: nền đan xen theo màu theme */
  background: var(--primary-color);
  color: #ffffff;
  border-radius: 6px;
  padding: 1.25rem 18px;
  font-size: 1.125rem;
  line-height: 1.35;
  text-align: left;
  margin: 16px 0;
}

body:is(.page-template-front-page-php,.front-page) .strength-mobile .m-item:nth-child(2n) {
  background: var(--secondary-color);
}

/* ================================================
📌 6. TESTIMONIALS
================================================== */
body:is(.page-template-front-page-php,.front-page) .home-testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

body:is(.page-template-front-page-php,.front-page) .testimonial-name {
  font-size: 1.25rem;
  font-weight: bold;
  margin: 0;
}

body:is(.page-template-front-page-php,.front-page) .testimonial-card {
  background: #ffffff;
  border-radius: 5px;
  padding: 1.25rem;
  text-align: center;
}

body:is(.page-template-front-page-php,.front-page) .testimonial-avatar-wrap {
  margin-top: -4.375rem;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: center;
}

body:is(.page-template-front-page-php,.front-page) .testimonial-avatar {
  width: 140px;
  height: 140px;
  border: 10px solid #ffffff;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.testimonial-role {
  margin-bottom: 1.25rem;
  color: #999;
}

.testimonial-content {
  text-align: left;
  margin-bottom: 1.25rem;
}

/* ================================================
📌 7. CTA
================================================== */
body:is(.page-template-front-page-php,.front-page) .home-cta {
  padding: 2.25rem 0;
  background: #111827;
  color: #ffffff;
}

body:is(.page-template-front-page-php,.front-page) .home-cta-title {
  margin-top: 0;
}

body:is(.page-template-front-page-php,.front-page) .home-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* ✅ NEW: chia rõ 2 cột text / button (desktop & tablet) */
body:is(.page-template-front-page-php,.front-page) .home-cta-text {
  min-width: 0;
  flex: 1 1 auto;
}

body:is(.page-template-front-page-php,.front-page) .home-cta-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
}


/* ================================================
📌 8. BLOG
================================================== */
body:is(.page-template-front-page-php,.front-page) .home-blog .home-blog-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
}

body:is(.page-template-front-page-php,.front-page) .home-blog .home-blog-grid > *{
  min-width: 0;
}

/* ✅ Blog thumb đã dùng chung markup + class với design thumb
   => KHÔNG set hover/img ở đây nữa để tránh trùng/đè CSS chung của theme
   => Chỉ giữ rule layout tối thiểu để anchor chiếm full width */
body:is(.page-template-front-page-php,.front-page) .home-blog .blog-thumb{
  display: block;
}

/* Title spacing giữ nguyên */
.blog-title {
  margin: 1.2rem 0 .5rem 0;
  font-size: 1.5rem;
}

.blog-title a {
  color: var(--text-color-1);
}

/* ================================================
📱 RESPONSIVE
================================================== */
@media (max-width: 1024px) {
  body:is(.page-template-front-page-php,.front-page) .home-hero {
    background-image: var(--hero-tablet);
  }
  body:is(.page-template-front-page-php,.front-page) .home-hero-boxed {
    background-image: var(--hero-tablet);
  }

  /* ✅ show đúng text tablet */
  body:is(.page-template-front-page-php,.front-page) .hero-text--desktop,
  body:is(.page-template-front-page-php,.front-page) .hero-text--mobile {
    display: none;
  }
  body:is(.page-template-front-page-php,.front-page) .hero-text--tablet {
    display: block;
  }

  body:is(.page-template-front-page-php,.front-page) .services-slide-inner {
    grid-template-columns: 1fr;
	  background: none;
  }

  body:is(.page-template-front-page-php,.front-page) .strength-board {
    width: 100%;
  }

  body:is(.page-template-front-page-php,.front-page) .strength-stage::after {
	background-image: none;
/*     width: 34%; */
  }
}

@media (max-width: 860px) {
  body:is(.page-template-front-page-php,.front-page) .strength-stage::after {
    display: none;
  }

  body:is(.page-template-front-page-php,.front-page) .strength-board {
    display: none;
  }

  body:is(.page-template-front-page-php,.front-page) .strength-mobile {
    display: block;
  }
}

@media (max-width: 768px) {

  body:is(.page-template-front-page-php,.front-page) .section-block {
    padding: 3.75rem 0 4.375rem 0;
  }

  body:is(.page-template-front-page-php,.front-page) .home-hero {
    background-image: var(--hero-mobile);
  }
  body:is(.page-template-front-page-php,.front-page) .home-hero-boxed {
    background-image: var(--hero-mobile);
  }

  /* ✅ show đúng text mobile */
  body:is(.page-template-front-page-php,.front-page) .hero-text--desktop,
  body:is(.page-template-front-page-php,.front-page) .hero-text--tablet {
    display: none;
  }
  body:is(.page-template-front-page-php,.front-page) .hero-text--mobile {
    display: block;
    align-items: center;
    text-align: center;
  }

  body:is(.page-template-front-page-php,.front-page) .home-services-slider {
    margin-top: 2rem;
  }

  body:is(.page-template-front-page-php,.front-page) .services-slide-inner {
    gap: 1rem;
  }

  body:is(.page-template-front-page-php,.front-page) .services-content {
    align-items: center;
    text-align: center;
    padding: 1.25rem 1.25rem 2.5rem 1.25rem;
  }

  body:is(.page-template-front-page-php,.front-page) .services-prev {
    left: 0.3125rem;
  }

  body:is(.page-template-front-page-php,.front-page) .services-next {
    right: 0.3125rem;
  }

  body:is(.page-template-front-page-php,.front-page) .home-testimonials-grid,
  body:is(.page-template-front-page-php,.front-page) .home-blog .home-blog-grid {
    grid-template-columns: 1fr;
  }

  body:is(.page-template-front-page-php,.front-page) .home-cta-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  body:is(.page-template-front-page-php,.front-page) .home-cta-content {
    margin-top: 0.9375rem;
  }

  body:is(.page-template-front-page-php,.front-page) .home-cta-actions {
    width: 100%;
    justify-content: center;
  }

  body:is(.page-template-front-page-php,.front-page) .home-hero--boxed .home-hero-content {
    padding: 2.75rem 1.25rem;
  }

  body:is(.page-template-front-page-php,.front-page) .testimonial-card {
    margin-bottom: 6.25rem;
  }

  body:is(.page-template-front-page-php,.front-page) .testimonial-card:last-child {
    margin-bottom: 0;
  }

  body:is(.page-template-front-page-php,.front-page) .home-blog .home-blog-grid {
    gap: 3rem;
  }
}
