/* =========================================
   BYALL AUTOMATION — PROJECTS PAGE STYLES
   projects.css
   ========================================= */

/* ── HERO ── */

.projects-hero {
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background: #031223;
  overflow: hidden;
  padding: 130px 24px 80px;
}

.projects-hero-bg {
  position: absolute;
  inset: 0;
  background: url("https://byallautomation.com/wp-content/uploads/2026/04/ba-hero-14.jpg") center/cover no-repeat;
  opacity: .22;
}

.projects-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,159,224,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,159,224,.07) 1px, transparent 1px);
  background-size: 48px 48px;
}

.projects-hero-line {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 70px;
  background: #1a9fe0;
}

.projects-hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.projects-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #1a9fe0;
  text-transform: uppercase;
  border: 1px solid rgba(26,159,224,.35);
  padding: 7px 17px;
  border-radius: 999px;
  margin-bottom: 28px;
  background: rgba(2,11,26,.50);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.projects-hero-eyebrow span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1a9fe0;
  display: inline-block;
}

.projects-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 76px);
  font-weight: 800;
  line-height: 1.03;
  color: #ffffff;
  margin: 0 0 12px;
  text-shadow: 0 4px 28px rgba(0,0,0,.5);
}

.projects-hero h1 em {
  font-style: normal;
  color: #1a9fe0;
}

.projects-hero-sub {
  font-size: 18px;
  line-height: 1.72;
  color: rgba(255,255,255,.80);
  margin: 22px auto 38px;
  max-width: 680px;
  font-weight: 300;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}

/* ── HERO STATS ── */

.projects-hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.projects-hero-stat {
  padding: 0 32px;
  border-right: 1px solid rgba(255,255,255,.12);
}

.projects-hero-stat:last-child { border-right: none; }

.projects-hero-stat-num {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  color: #ffffff;
  display: block;
  letter-spacing: -0.5px;
}

.projects-hero-stat-num em {
  font-style: normal;
  color: #1a9fe0;
}

.projects-hero-stat-label {
  font-size: 11px;
  color: rgba(255,255,255,.50);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
}

/* ── SCROLL INDICATOR ── */

.projects-hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.30);
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 700;
  font-family: var(--font-display);
  text-transform: uppercase;
}

.projects-hero-scroll-dot {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, rgba(26,159,224,.8), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.1); }
}

/* ── PROJECT GRID SECTION ── */

.projects-wrap {
  background: #f8fafc;
  padding: 90px 24px;
  color: #0f172a;
}

.projects-wrap .section-title {
  text-align: center;
  margin-bottom: 56px;
}

.projects-wrap .section-title h2 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.projects-wrap .section-title p {
  color: #64748b;
  font-size: 17px;
  font-weight: 300;
}

.projects-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

/* ── PROJECT BOX ── */

.project-box {
  background: #ffffff;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(26,159,224,.16);
  box-shadow: 0 4px 20px rgba(15,23,42,.06);
  transition: transform var(--t-mid, .3s) cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow var(--t-mid, .3s) ease;
  position: relative;
}

.project-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1a9fe0, #f5c518);
  opacity: 0;
  transition: opacity .3s ease;
}

.project-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 26px 56px rgba(15,23,42,.14), 0 0 0 1px rgba(26,159,224,.2);
}

.project-box:hover::before { opacity: 1; }

.project-logo {
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  padding: 26px;
  overflow: hidden;
}

.project-logo img {
  max-height: 150px;
  width: auto;
  object-fit: contain;
  transition: transform .5s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-box:hover .project-logo img { transform: scale(1.06); }

.project-content { padding: 28px; }

.project-tag {
  display: inline-block;
  font-family: var(--font-display, sans-serif);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #1a9fe0;
  margin-bottom: 10px;
}

.project-content h3 {
  font-family: var(--font-display, sans-serif);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
  color: #0f172a;
  letter-spacing: -0.3px;
}

.project-content p {
  color: #64748b;
  font-size: 14px;
  line-height: 1.72;
}

/* ── TESTIMONIALS ── */

.ba-testi-section {
  margin-top: 90px;
  overflow: hidden;
}

.ba-testi-header {
  text-align: center;
  margin-bottom: 44px;
}

.ba-testi-header h2 {
  font-family: var(--font-display, sans-serif);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
  letter-spacing: -0.8px;
}

.ba-testi-header p {
  color: #64748b;
  font-size: 17px;
  font-weight: 300;
}

.ba-testi-wrap {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}

.ba-testi-track {
  display: flex;
  gap: 22px;
  width: max-content;
  animation: testiScroll 68s linear infinite;
}

.ba-testi-track:hover { animation-play-state: paused; }

@keyframes testiScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
/* FINAL MOBILE TESTIMONIAL FIX */

@media (max-width:768px){

  .ba-testi-section,
  .ba-testi-wrap,
  .ba-testi-track,
  .ba-testi-card,
  .ba-quote{
    box-sizing:border-box !important;
  }

  .ba-testi-wrap{
    width:100% !important;
    max-width:100% !important;
    overflow:visible !important;
    mask-image:none !important;
    -webkit-mask-image:none !important;
  }

  .ba-testi-track{
    width:100% !important;
    max-width:100% !important;
    display:block !important;
    transform:none !important;
    animation:none !important;
  }

  .ba-testi-card{
    width:100% !important;
    max-width:100% !important;
    margin:0 0 18px 0 !important;
    flex:none !important;
  }

  .ba-quote{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:anywhere !important;
    line-height:1.7 !important;
  }
}
.ba-testi-card {
  width: 380px;
  background: #ffffff;
  border: 1px solid rgba(26,159,224,.16);
  border-radius: 26px;
  padding: 30px;
  box-shadow: 0 8px 28px rgba(15,23,42,.07);
  flex-shrink: 0;
  transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow .3s ease;
}

.ba-testi-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(15,23,42,.13);
}

.ba-stars {
  color: #f5c518;
  font-size: 17px;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.ba-quote {
  color: #334155;
  font-size: 14px;
  line-height: 1.76;
  margin-bottom: 22px;
  font-weight: 300;
}

.ba-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ba-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display, sans-serif);
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.ba-author-name {
  font-family: var(--font-display, sans-serif);
  font-weight: 700;
  color: #0f172a;
  font-size: 14px;
  margin-bottom: 3px;
}

.ba-author-role {
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}
@media (max-width:768px){

  .testimonials,
  .testimonial-section,
  .reviews-section{
    padding-bottom:40px !important;
    min-height:auto !important;
    height:auto !important;
  }

  .testimonial-slider,
  .testimonial-track,
  .testimonial-wrapper{
    height:auto !important;
    min-height:auto !important;
  }

  .testimonial-card,
  .review-card{
    height:auto !important;
    min-height:auto !important;
    padding:24px 20px !important;
  }

}
/* ── PROJECTS CTA ── */

.projects-cta {
  background:
    radial-gradient(ellipse at center, rgba(26,159,224,.22), transparent 60%),
    linear-gradient(145deg, #020b1a 0%, #0d1b3e 100%);
  text-align: center;
  padding: 96px 20px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.projects-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 30%, rgba(245,197,24,.12), transparent 45%);
  pointer-events: none;
}

.projects-cta h2 {
  font-family: var(--font-display, sans-serif);
  font-size: clamp(30px, 4vw, 48px);
  margin-bottom: 16px;
  font-weight: 800;
  letter-spacing: -0.8px;
  position: relative;
}

.projects-cta p {
  color: rgba(255,255,255,.78);
  font-size: 18px;
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.72;
  font-weight: 300;
  position: relative;
}

.projects-cta a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  background: linear-gradient(135deg, #1a9fe0, #1a6fc4);
  color: #ffffff;
  padding: 16px 36px;
  border-radius: 14px;
  font-family: var(--font-display, sans-serif);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow .3s ease,
              background .3s ease;
  box-shadow: 0 12px 32px rgba(26,159,224,.32);
}

.projects-cta a:hover {
  background: linear-gradient(135deg, #f5c518, #d4a010);
  color: #020b1a;
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(245,197,24,.30);
}

/* ── RESPONSIVE ── */

@media (max-width: 1000px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {

  .projects-hero {
    min-height: auto;
    padding: 115px 18px 65px;
  }

  .projects-hero-content {
    max-width: 100%;
  }

  .projects-hero-eyebrow {
    font-size: 9px;
    letter-spacing: 1px;
    padding: 7px 13px;
    margin-bottom: 20px;
  }

  .projects-hero h1 {
    font-size: 32px;
    line-height: 1.08;
    letter-spacing: -0.6px;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
  }

  .projects-hero-sub {
    font-size: 15px;
    line-height: 1.6;
    margin: 18px auto 28px;
  }

  .projects-hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .projects-hero-stat {
    padding: 0;
    border-right: none;
  }

  .projects-hero-stat-num {
    font-size: 24px;
  }

  .projects-hero-stat-label {
    font-size: 9.5px;
  }

  .projects-wrap {
    padding: 64px 18px;
  }

  .projects-wrap .section-title {
    margin-bottom: 36px;
  }

  .projects-wrap .section-title h2 {
    font-size: 30px;
    line-height: 1.12;
  }

  .projects-wrap .section-title p {
    font-size: 15px;
    line-height: 1.6;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .project-box {
    width: 100%;
    border-radius: 22px;
  }

  .project-logo {
    height: 170px;
    padding: 22px;
  }

  .project-logo img {
    max-height: 130px;
  }

  .project-content {
    padding: 24px 22px;
  }

  .project-content h3 {
    font-size: 20px;
  }

  .project-content p {
    font-size: 14px;
    line-height: 1.65;
  }

  .ba-testi-section {
    margin-top: 64px;
  }

  .ba-testi-card {
    width: 310px;
    padding: 24px;
    border-radius: 22px;
  }

  .projects-cta {
    padding: 70px 18px;
  }

  .projects-cta h2 {
    font-size: 30px;
    line-height: 1.12;
  }

  .projects-cta p {
    font-size: 15px;
    line-height: 1.6;
  }

  .projects-cta a {
    width: 100%;
    max-width: 320px;
    justify-content: center;
    padding: 15px 20px;
  }
}

@media (max-width: 520px) {

  .projects-hero {
    padding: 105px 16px 58px;
  }

  .projects-hero h1 {
    font-size: 28px;
  }

  .projects-hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .ba-testi-card {
    width: 290px;
  }
}
/* MOBILE TESTIMONIAL FIX */

@media (max-width:768px){

  .ba-testi-track{
    animation:none !important;
    width:100% !important;
    display:flex !important;
    flex-direction:column !important;
    gap:18px !important;
  }

  .ba-testi-card{
    width:100% !important;
    max-width:100% !important;
    flex:none !important;
    padding:24px !important;
  }

  .ba-quote{
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:break-word !important;
    overflow:hidden !important;
    font-size:14px !important;
    line-height:1.7 !important;
  }

}