/* ================================================================
   PixelBoard Pages — Custom Styles for Section Components
   ================================================================
   Adds proper spacing, containers, card visuals, gradients,
   hover effects, and micro-animations to page-specific sections.
   ================================================================ */

/* ── Base Section Spacing ─────────────────────────────────────── */
.pb-section {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.pb-section--dark {
  background: var(--tj-color-heading-primary, #0c0c21);
  color: #fff;
}

.pb-section--muted {
  background: var(--tj-color-theme-bg, #dddcf0);
}

.pb-section--gradient {
  background: linear-gradient(135deg, var(--tj-color-heading-primary, #0c0c21) 0%, #141450 50%, var(--tj-color-heading-primary, #0c0c21) 100%);
  color: #fff;
}

.pb-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
}

/* ── Hero Split Layout (About / PixelCore hero) ──────────────── */
.pb-hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.pb-hero-split__media {
  position: relative;
  min-height: 400px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--tj-color-theme-bg, #dddcf0);
  display: flex;
  align-items: flex-end;
  padding: 30px;
}

.pb-hero-split__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pb-about-bottom {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-top: 20px;
}

.pb-about-bottom .tj-review-box {
  flex: 1;
}

/* ── Decorative Pattern Images ───────────────────────────────── */
.pb-pattern {
  position: absolute;
  pointer-events: none;
  opacity: 0.1;
  z-index: 0;
}

.pb-pattern--left {
  left: 0;
  bottom: 0;
}

.pb-pattern--right {
  right: 0;
  top: 0;
}

@media (max-width: 767px) {
  .pb-hero-split {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .pb-hero-split__media {
    min-height: 250px;
  }
  .pb-about-bottom {
    flex-direction: column;
  }
}

/* ── Section Heading Enhancements ─────────────────────────────── */
.pb-section .sec-heading {
  margin-bottom: 50px;
  text-align: center;
}

.pb-section .sec-heading .desc p {
  max-width: 700px;
  margin: 15px auto 0;
  font-size: 17px;
  line-height: 1.7;
  opacity: 0.8;
}

/* ── Feature Cards (for ChooseBest pattern) ───────────────────── */
.pb-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.pb-feature-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 35px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.pb-feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--tj-color-theme-primary, #3c3cb4), #6b6bbf);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pb-feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.pb-feature-card:hover::before {
  transform: scaleX(1);
}

.pb-feature-card__icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tj-color-theme-primary, #3c3cb4), #6b6bbf);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  font-size: 28px;
  color: #fff;
  transition: transform 0.4s;
}

.pb-feature-card:hover .pb-feature-card__icon {
  transform: scale(1.1) rotate(5deg);
}

.pb-feature-card__title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--tj-color-heading-primary, #0c0c21);
}

.pb-feature-card__title a {
  color: inherit;
  text-decoration: none;
}

.pb-feature-card__desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--tj-color-body-secondary, #555);
}

/* ── Dark Feature Cards ───────────────────────────────────────── */
.pb-section--dark .pb-feature-card,
.pb-section--gradient .pb-feature-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.pb-section--dark .pb-feature-card:hover,
.pb-section--gradient .pb-feature-card:hover {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.pb-section--dark .pb-feature-card__title,
.pb-section--gradient .pb-feature-card__title {
  color: #fff;
}

.pb-section--dark .pb-feature-card__desc,
.pb-section--gradient .pb-feature-card__desc {
  color: rgba(255, 255, 255, 0.7);
}

/* ── Blog / Case Study Card Enhancements ──────────────────────── */
.pb-section .blog-item {
  margin-bottom: 0;
  transition: transform 0.4s, box-shadow 0.4s;
}

.pb-section .blog-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

/* ── Role/Job Card ────────────────────────────────────────────── */
.pb-role-card {
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.35s;
}

.pb-role-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
  border-color: var(--tj-color-theme-primary, #3c3cb4);
}

.pb-role-card__title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--tj-color-heading-primary, #0c0c21);
}

.pb-role-card__meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 14px;
  color: var(--tj-color-body-secondary, #777);
}

.pb-role-card__badge {
  color: var(--tj-color-theme-primary, #3c3cb4);
  font-weight: 600;
}

/* ── Filter Buttons Group ─────────────────────────────────────── */
.pb-filter-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 50px;
}

.pb-filter-group .tj-primary-btn {
  cursor: pointer;
  font-size: 14px;
  padding: 10px 22px;
}

/* ── Search Bar ───────────────────────────────────────────────── */
.pb-search-bar {
  max-width: 500px;
  margin: 0 auto 30px;
}

/* ── Stat Badge on Card ───────────────────────────────────────── */
.pb-stat-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tj-color-theme-primary, #3c3cb4), #6b6bbf);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 24px;
  line-height: 1.1;
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  box-shadow: 0 4px 16px rgba(0, 180, 216, 0.4);
}

.pb-stat-badge small {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Newsletter Section ───────────────────────────────────────── */
.pb-newsletter {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--tj-color-heading-primary, #0c0c21) 0%, #141450 100%);
  color: #fff;
  text-align: center;
}

.pb-newsletter .sec-heading {
  margin-bottom: 30px;
}

/* ── Hero Split (About story, PixelCore hero) ─────────────────── */
.pb-hero-split {
  padding: 100px 0;
}

/* ── Swiper / Carousel Sections ───────────────────────────────── */
.pb-section .service-wrapper {
  margin-top: 20px;
}

/* ── Decorative Elements ──────────────────────────────────────── */
.pb-deco {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
}

.pb-deco--top-left {
  top: -50px;
  left: -80px;
}

.pb-deco--bottom-right {
  bottom: -50px;
  right: -80px;
}

/* ── Glow / Floating Animation ────────────────────────────────── */
@keyframes pb-float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

@keyframes pb-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 180, 216, 0.2); }
  50% { box-shadow: 0 0 40px rgba(0, 180, 216, 0.4); }
}

@keyframes pb-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pb-fade-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pb-scale-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.pb-animate-float {
  animation: pb-float 4s ease-in-out infinite;
}

.pb-animate-glow {
  animation: pb-glow 3s ease-in-out infinite;
}

/* ── Staggered grid animation ─────────────────────────────────── */
.pb-stagger > * {
  opacity: 0;
  animation: pb-fade-up 0.6s ease forwards;
}

.pb-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.pb-stagger > *:nth-child(2) { animation-delay: 0.2s; }
.pb-stagger > *:nth-child(3) { animation-delay: 0.3s; }
.pb-stagger > *:nth-child(4) { animation-delay: 0.4s; }
.pb-stagger > *:nth-child(5) { animation-delay: 0.5s; }
.pb-stagger > *:nth-child(6) { animation-delay: 0.6s; }
.pb-stagger > *:nth-child(7) { animation-delay: 0.7s; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .pb-section {
    padding: 70px 0;
  }

  .pb-features-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }

  .pb-section .sec-heading {
    margin-bottom: 35px;
  }
}

@media (max-width: 767px) {
  .pb-section {
    padding: 50px 0;
  }

  .pb-container {
    padding: 0 16px;
  }

  .pb-features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pb-feature-card {
    padding: 28px 24px;
  }

  .pb-role-card {
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
  }
}


/* ================================================================
   FIX: Existing Elementor Components on Inner Pages
   ================================================================
   The existing Home* components (HomeCounterStats, HomeBrandCarousel,
   HomeChooseBest, HomeServices, etc.) lack proper section spacing
   when reused on inner pages because their padding was set by
   Elementor post CSS (post-234.css, etc.) which only targets specific
   data-id attributes. These rules add generic spacing.
   ================================================================ */

/* ── Vertical padding for ALL e-con parent sections ────────────── */
/* The original template set these per data-id in post-*.css files.
   Since we don't have those, add generic padding to every section.
   Using padding-block-start/end with !important to override Elementor's
   var(--padding-block-start) system. Direct properties don't cascade
   to children like CSS custom properties do. */
.elementor > .e-con.e-parent {
  padding-block-start: 60px !important;
  padding-block-end: 60px !important;
}

/* ── Spacing between consecutive Elementor sections ────────────── */
.elementor > .e-con.e-parent + .e-con.e-parent {
  margin-top: 0;          /* padding already creates internal space */
}

/* ── Extra gap between ChooseBest and BrandCarousel on home page ── */
.elementor > [data-id="brand"].e-con.e-parent {
  margin-top: 0px !important;
}

/* ── pb-section siblings: no double margin (padding handles it) ── */
.pb-section + .e-con.e-parent,
.e-con.e-parent + .pb-section {
  margin-top: 0;
}

/* ── e-con-boxed inner needs proper width constraint ─────────── */
[data-elementor-type="wp-page"] > .e-con.e-parent > .e-con-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Contact form + map wrapper spacing ──────────────────────── */
.contact-form-map-grid {
  padding-top: 80px;
  padding-bottom: 60px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Contact cards grid ──────────────────────────────────────── */
.contact-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  width: 100%;
  align-items: stretch;
}

/* Make grid children (elementor-widget wrappers) stretch to equal height */
.contact-cards-grid > * {
  display: flex;
  flex-direction: column;
}

.contact-cards-grid > * > .elementor-widget-container {
  display: flex;
  flex: 1;
}

.contact-cards-grid > * > .elementor-widget-container > .contact-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.contact-cards-grid .contact-item {
  text-align: center;
  padding: 36px 20px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--tj-color-grey-1, #ededf5);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.contact-cards-grid .contact-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

.contact-cards-grid .contact-item .contact-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--tj-color-theme-bg, #dddcf0);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 24px;
  color: var(--tj-color-theme-primary, #3c3cb4);
  transition: all 0.35s;
}

.contact-cards-grid .contact-item:hover .contact-icon {
  background: var(--tj-color-theme-primary, #3c3cb4);
  color: #fff;
}

.contact-cards-grid .contact-item .contact-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--tj-color-heading-primary, #0c0c21);
}

.contact-cards-grid .contact-item .contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-cards-grid .contact-item .contact-list li {
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 1.6;
}

.contact-cards-grid .contact-item .contact-list a {
  color: var(--tj-color-text-body, #2e3355);
  text-decoration: none;
  transition: color 0.3s;
}

.contact-cards-grid .contact-item .contact-list a:hover {
  color: var(--tj-color-theme-primary, #3c3cb4);
}

@media (max-width: 1024px) {
  .contact-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .contact-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .contact-form-map-grid {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ── Sec-heading spacing inside Elementor containers ─────────── */
[data-elementor-type="wp-page"] .sec-heading {
  margin-bottom: 40px;
}

[data-elementor-type="wp-page"] .sec-heading .sub-title {
  margin-bottom: 16px;
  display: inline-block;
}

[data-elementor-type="wp-page"] .sec-heading .sec-title {
  margin-bottom: 16px;
}

[data-elementor-type="wp-page"] .sec-heading .desc {
  margin-top: 10px;
}

[data-elementor-type="wp-page"] .sec-heading .desc p {
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
  font-size: 17px;
}

/* ── Editor text block spacing ───────────────────────────────── */
[data-elementor-type="wp-page"] .editor_text p {
  margin-bottom: 16px;
  line-height: 1.8;
  font-size: 16px;
}

[data-elementor-type="wp-page"] .editor_text p:last-child {
  margin-bottom: 0;
}

/* ── Blog items need bottom margin in grids ──────────────────── */
[data-elementor-type="wp-page"] .blog-item {
  margin-bottom: 0;
}

[data-elementor-type="wp-page"] .blog-item .blog-content {
  padding: 20px 24px 24px;
}

[data-elementor-type="wp-page"] .blog-item .blog-content .title {
  margin-bottom: 10px;
  line-height: 1.4;
}

[data-elementor-type="wp-page"] .blog-item .blog-content p {
  margin-bottom: 14px;
  line-height: 1.7;
  font-size: 15px;
}

[data-elementor-type="wp-page"] .blog-item .blog-content .blog-meta {
  margin-bottom: 10px;
}

/* ── Choose-best-area grid layout (GLOBAL — used on home + inner pages) */
.choose-best-area {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}

.choose-best-item {
  padding: 32px 28px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--tj-color-grey-1, #ededf5);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.choose-best-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--tj-color-theme-primary, #3c3cb4), #6b6bbf);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.choose-best-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

.choose-best-item:hover::before {
  transform: scaleX(1);
}

.choose-best-item .choose-icon {
  margin-bottom: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tj-color-theme-primary, #3c3cb4), #6b6bbf);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  transition: transform 0.4s;
}

.choose-best-item:hover .choose-icon {
  transform: scale(1.1) rotate(5deg);
}

.choose-best-item .choose-content .title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--tj-color-heading-primary, #0c0c21);
}

.choose-best-item .choose-content .title a {
  color: inherit;
  text-decoration: none;
}

.choose-best-item .choose-content .desc {
  font-size: 15px;
  line-height: 1.75;
  color: var(--tj-color-text-body, #2e3355);
  margin: 0;
}

/* Dark bg variant — only inside explicit dark/gradient sections */
.pb-section--dark .choose-best-item,
.pb-section--gradient .choose-best-item {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.pb-section--dark .choose-best-item:hover,
.pb-section--gradient .choose-best-item:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}

.pb-section--dark .choose-best-item .choose-content .title,
.pb-section--gradient .choose-best-item .choose-content .title {
  color: #fff;
}

.pb-section--dark .choose-best-item .choose-content .desc,
.pb-section--gradient .choose-best-item .choose-content .desc {
  color: rgba(255, 255, 255, 0.7);
}

/* ── Service slider items spacing ────────────────────────────── */
[data-elementor-type="wp-page"] .service-item .service-content {
  padding: 20px 24px 28px;
}

[data-elementor-type="wp-page"] .service-item .service-content .title {
  margin-bottom: 10px;
}

[data-elementor-type="wp-page"] .service-item .service-content .desc {
  margin-bottom: 14px;
  line-height: 1.7;
}

/* ── Experience box spacing ──────────────────────────────────── */
[data-elementor-type="wp-page"] .experience-box {
  padding: 28px 24px;
}

[data-elementor-type="wp-page"] .experience-box .sub-title {
  margin-bottom: 8px;
}

[data-elementor-type="wp-page"] .experience-box .customers-number {
  margin-bottom: 8px;
}

/* ── Review box spacing ──────────────────────────────────────── */
[data-elementor-type="wp-page"] .tj-review-box {
  padding: 28px 24px;
}

[data-elementor-type="wp-page"] .tj-review-box .desc {
  margin-bottom: 16px;
  line-height: 1.7;
}

/* ── Countup wrap spacing ────────────────────────────────────── */
[data-elementor-type="wp-page"] .countup-wrap {
  margin-top: 10px;
  margin-bottom: 10px;
}

/* ── Project area items spacing ──────────────────────────────── */
[data-elementor-type="wp-page"] .project-area {
  gap: 20px;
}

/* ── Button wrapper spacing ──────────────────────────────────── */
[data-elementor-type="wp-page"] .tj-btn-wrapper {
  margin-top: 10px;
}

/* ── Contact form spacing ────────────────────────────────────── */
[data-elementor-type="wp-page"] .contact-form .form-input {
  margin-bottom: 20px;
}

/* ── Decorative patterns z-index fix ─────────────────────────── */
[data-elementor-type="wp-page"] .elementor-absolute {
  z-index: 0;
}

[data-elementor-type="wp-page"] .elementor-widget-container {
  position: relative;
  z-index: 1;
}

/* ── Swiper pagination spacing ───────────────────────────────── */
/* The pagination is inside .swiper-pagination-area (OUTSIDE .swiper),
   so override Swiper's default absolute positioning */
.swiper-pagination-area .swiper-pagination {
  position: static !important;
  width: auto !important;
}
.swiper-pagination-area {
  margin-top: 30px;
}

/* ── Section divider line between alternating sections ────────── */
.pb-section--muted + .pb-section:not(.pb-section--muted):not(.pb-section--dark):not(.pb-section--gradient) {
  border-top: 1px solid var(--tj-color-grey-1, #ededf5);
}

/* ── Home page banner — e-con-full hero sections don't need extra padding ── */
/* Only targets e-con-full (full-width banners like HomeBanner), not
   e-con-boxed sections used as first content on inner pages. */
.elementor > .e-con-full.e-con.e-parent:first-child {
  padding-block-start: 0 !important;
  padding-block-end: 0 !important;
}

/* ── Responsive fixes for Elementor inner-page components ────── */
@media (max-width: 1024px) {
  .elementor > .e-con.e-parent {
    padding-block-start: 40px !important;
    padding-block-end: 40px !important;
  }
  .elementor > .e-con-full.e-con.e-parent:first-child {
    padding-block-start: 0 !important;
    padding-block-end: 0 !important;
  }

  [data-elementor-type="wp-page"] > .e-con.e-parent > .e-con-inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .choose-best-area {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 767px) {
  .elementor > .e-con.e-parent {
    padding-block-start: 30px !important;
    padding-block-end: 30px !important;
  }
  .elementor > .e-con-full.e-con.e-parent:first-child {
    padding-block-start: 0 !important;
    padding-block-end: 0 !important;
  }

  [data-elementor-type="wp-page"] > .e-con.e-parent > .e-con-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .choose-best-area {
    grid-template-columns: 1fr;
  }
}

