/* Homepage – Premium Industrial Layout */

.p-home {
  overflow-x: hidden;
}

/* ========== HERO / SLIDESHOW ========== */
.p-home .p-hero {
  position: relative;
  background: var(--p-secondary);
}

.p-home .p-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.08) 0%,
    transparent 35%,
    rgba(15, 23, 42, 0.04) 100%
  );
  z-index: 2;
}

.p-home .slideshow {
  background: var(--p-secondary);
  margin: 0;
}

.p-home .tp-banner-container {
  border: none;
}

.p-home .slideshow img {
  width: 100%;
  height: auto;
  display: block;
  max-height: min(560px, 72vh);
  object-fit: cover;
  animation: pHeroFade 0.8s ease-out;
}

@keyframes pHeroFade {
  from {
    opacity: 0.85;
    transform: scale(1.02);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========== INTRO ========== */
.p-home-intro {
  position: relative;
  padding: 72px 0 56px !important;
  background:
    radial-gradient(900px 320px at 10% 0%, rgba(0, 102, 204, 0.09), transparent 60%),
    radial-gradient(700px 280px at 90% 20%, rgba(59, 155, 255, 0.06), transparent 55%),
    var(--p-bg);
}

.p-home-intro .sections-title {
  max-width: 900px;
  margin: 0 auto;
}

.p-home-intro .sections-title p {
  font-size: clamp(0.95rem, 1.8vw, 1.0625rem);
}

/* ========== PRODUCTS GRID ========== */
.p-home-products {
  padding: 56px 0 80px !important;
  background: var(--p-surface);
  position: relative;
}

.p-home-products::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--p-border), transparent);
}

.p-home-products .sections-title {
  margin-bottom: 40px;
}

.p-product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 0;
}

@media (min-width: 576px) {
  .p-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (min-width: 992px) {
  .p-product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

.p-product-grid .portfolio-item {
  padding: 0 !important;
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
}

.p-home .portfolio-one {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--p-radius) !important;
  border: 1px solid var(--p-border);
  background: var(--p-surface) !important;
  box-shadow: var(--p-shadow-sm) !important;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.p-home .portfolio-one:hover {
  transform: translateY(-8px);
  box-shadow: var(--p-shadow) !important;
  border-color: rgba(0, 102, 204, 0.25);
}

.p-home .portfolio-head {
  position: relative;
  overflow: hidden;
}

.p-home .portfolio-img {
  min-height: 200px;
  padding: 20px;
  background: linear-gradient(145deg, rgba(0, 102, 204, 0.04), rgba(15, 23, 42, 0.02));
  transition: background 0.35s ease;
}

.p-home .portfolio-one:hover .portfolio-img {
  background: linear-gradient(145deg, rgba(0, 102, 204, 0.08), rgba(59, 155, 255, 0.04));
}

.p-home .portfolio-img img {
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.p-home .portfolio-one:hover .portfolio-img img {
  transform: scale(1.05);
}

.p-home .portfolio-hover {
  background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.55)) !important;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.p-home .portfolio-one:hover .portfolio-hover {
  opacity: 1;
}

.p-home .portfolio-link {
  width: 44px;
  height: 44px;
  line-height: 44px;
  border-radius: 12px;
  background: var(--p-primary) !important;
  color: #fff !important;
  transition: transform 0.25s ease, background 0.25s ease;
}

.p-home .portfolio-one:hover .portfolio-link {
  transform: scale(1.08);
}

.p-home .portfolio-content {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px !important;
  margin-top: auto;
}

.p-home .portfolio-content > i {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 102, 204, 0.1) !important;
  color: var(--p-primary) !important;
  border-radius: 10px;
  transition: background 0.25s ease, color 0.25s ease;
}

.p-home .portfolio-one:hover .portfolio-content > i {
  background: var(--p-primary) !important;
  color: #fff !important;
}

.p-home .portfolio-meta h6 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.p-home .portfolio-meta h6 a {
  color: var(--p-secondary) !important;
  transition: color 0.2s ease;
}

.p-home .portfolio-one:hover .portfolio-meta h6 a {
  color: var(--p-primary) !important;
}

/* Stagger animation */
.p-home .p-product-grid .portfolio-item {
  opacity: 0;
  transform: translateY(20px);
  animation: pCardIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.p-home .p-product-grid .portfolio-item:nth-child(1) { animation-delay: 0.05s; }
.p-home .p-product-grid .portfolio-item:nth-child(2) { animation-delay: 0.1s; }
.p-home .p-product-grid .portfolio-item:nth-child(3) { animation-delay: 0.15s; }
.p-home .p-product-grid .portfolio-item:nth-child(4) { animation-delay: 0.2s; }
.p-home .p-product-grid .portfolio-item:nth-child(5) { animation-delay: 0.25s; }
.p-home .p-product-grid .portfolio-item:nth-child(6) { animation-delay: 0.3s; }

@keyframes pCardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== CTA STRIP ========== */
.p-home-cta {
  padding: 48px 0;
  background: linear-gradient(135deg, var(--p-secondary) 0%, #1a365d 50%, var(--p-primary) 100%);
  color: #fff;
  text-align: center;
}

.p-home-cta__inner {
  max-width: 640px;
  margin: 0 auto;
}

.p-home-cta__title {
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  margin: 0 0 10px;
  color: #fff;
}

.p-home-cta__text {
  margin: 0 0 22px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.6;
}

.p-home-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--p-secondary) !important;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.p-home-cta__btn:hover {
  color: var(--p-primary) !important;
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

/* ========== GOOGLE REVIEWS ========== */
.p-home-reviews {
  padding: 72px 0 88px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0, 102, 204, 0.07), transparent 55%),
    var(--p-bg);
  opacity: 1 !important;
  transform: none !important;
}

.p-home-reviews .container {
  max-width: var(--p-container);
}

.p-reviews-head {
  text-align: center;
  margin-bottom: 32px;
}

/* Widget shell – do NOT flex/constrain SociableKit inner nodes */
.p-reviews-widget {
  width: 100%;
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  padding: 24px 20px 28px;
  position: relative;
  overflow: visible;
  opacity: 1;
  transform: none;
}

.p-reviews-widget::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, var(--p-primary-dark), var(--p-primary), var(--p-primary-light));
}

.p-home-reviews .sk-ww-google-reviews {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 280px;
  overflow: visible !important;
}

/* Let third-party widget control its own card layout */
.p-home-reviews .sk-ww-google-reviews iframe {
  width: 100% !important;
  max-width: 100% !important;
  border: 0;
  min-height: 320px;
}

.p-home-reviews .sk-ww-google-reviews > div {
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.p-home-reviews .sk-ww-google-reviews > div:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Scroll reveal on home */
.p-home .p-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.p-home .p-reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .p-home .slideshow img,
  .p-home .p-product-grid .portfolio-item {
    animation: none !important;
    opacity: 1;
    transform: none;
  }

  .p-home .p-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 767px) {
  .p-home-intro {
    padding: 40px 0 36px !important;
  }

  .p-home-intro .sections-title {
    padding: 0 4px;
  }

  .p-home-intro .sections-title-h3 h1,
  .p-home-products .sections-title-h3 h3,
  .p-reviews-head .sections-title-h3 h2 {
    font-size: clamp(1.35rem, 5.5vw, 1.5rem) !important;
  }

  .p-home-intro .sections-title p {
    font-size: 0.9375rem;
    line-height: 1.65;
    padding: 0 4px;
  }

  .p-home-products {
    padding: 36px 0 48px !important;
  }

  .p-home-products .sections-title {
    margin-bottom: 28px;
    padding: 0 4px;
  }

  .p-home .portfolio-img {
    min-height: 160px;
    padding: 16px;
  }

  .p-home .portfolio-content {
    padding: 14px 16px !important;
    gap: 10px;
  }

  .p-home .portfolio-meta h6 {
    font-size: 13px;
    line-height: 1.35;
  }

  .p-home-cta {
    padding: 32px 16px;
  }

  .p-home-cta__btn {
    width: 100%;
    justify-content: center;
    max-width: 320px;
  }

  .p-home-reviews {
    padding: 40px 0 56px;
  }

  .p-reviews-head {
    padding: 0 4px;
    margin-bottom: 24px;
  }

  .p-reviews-head p {
    font-size: 14px;
  }

  .p-reviews-widget {
    padding: 16px 12px 20px;
    border-radius: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .p-home .slideshow img {
    max-height: min(380px, 48vh);
  }
}

@media (max-width: 480px) {
  .p-product-grid {
    gap: 14px;
  }

  .p-home .portfolio-one:hover {
    transform: none;
  }

  .p-home-cta__title {
    font-size: 1.15rem;
  }
}
