/* ============================================================
   BizGrowTech — Shared Animation & Enhancement CSS
   Scroll-triggered animations + Tailwind-compatible utilities
   ============================================================ */

/* ─── Keyframes ─────────────────────────────────────────── */
@keyframes fadeUpIn {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDownIn {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 166, 35, 0.4); }
  50%       { box-shadow: 0 0 0 12px rgba(245, 166, 35, 0); }
}
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes floatBounce {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}
@keyframes rotateIn {
  from { opacity: 0; transform: rotate(-10deg) scale(0.9); }
  to   { opacity: 1; transform: rotate(0deg) scale(1); }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(20px) scale(0.8); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes lineGrow {
  from { width: 0; }
  to   { width: 60px; }
}
@keyframes borderPulse {
  0%, 100% { border-color: var(--yellow, #F5A623); }
  50%       { border-color: transparent; }
}
@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
  50%       { opacity: 1; transform: scale(1) rotate(180deg); }
}

/* ─── Pre-animation state (hidden until JS adds .anim-ready) ─ */
.anim-fade-up,
.anim-fade-down,
.anim-slide-left,
.anim-slide-right,
.anim-zoom-in,
.anim-rotate-in {
  opacity: 0;
  will-change: opacity, transform;
  transition: opacity 0.1s, transform 0.1s;
}

/* ─── Visible states (JS adds .is-visible) ────────────────── */
.anim-fade-up.is-visible {
  animation: fadeUpIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.anim-fade-down.is-visible {
  animation: fadeDownIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.anim-slide-left.is-visible {
  animation: slideInLeft 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.anim-slide-right.is-visible {
  animation: slideInRight 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.anim-zoom-in.is-visible {
  animation: zoomIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.anim-rotate-in.is-visible {
  animation: rotateIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ─── Stagger delays ──────────────────────────────────────── */
.anim-delay-1 { animation-delay: 0.1s !important; }
.anim-delay-2 { animation-delay: 0.2s !important; }
.anim-delay-3 { animation-delay: 0.3s !important; }
.anim-delay-4 { animation-delay: 0.4s !important; }
.anim-delay-5 { animation-delay: 0.5s !important; }
.anim-delay-6 { animation-delay: 0.6s !important; }

/* ─── Always-on (load) animations ────────────────────────── */

/* ─── Section Header — Center aligned, beautiful ──────────── */
.section-header {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  max-width: 680px;
}
.section-header h2 {
  margin-bottom: 16px !important;
}
.section-header p {
  margin-bottom: 0 !important;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Section Tag — centered badge with gradient animation ── */
.section-tag {
  display: inline-block !important;
  text-align: center !important;
  /* Center it when inside a flex/block parent */
  align-self: center;
  margin-left: auto;
  margin-right: auto;
  /* Animated gradient shimmer */
  background: linear-gradient(90deg, #f5a62322, #f5a62377, #f5a62322) !important;
  background-size: 200% auto !important;
  animation: gradientShift 3s ease infinite !important;
  position: relative;
  overflow: hidden;
  /* Enhanced look */
  padding: 6px 18px !important;
  border-radius: 24px !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: var(--yellow-dark, #E09010) !important;
  border: 1px solid rgba(245, 166, 35, 0.25) !important;
  box-shadow: 0 2px 10px rgba(245, 166, 35, 0.12) !important;
  margin-bottom: 14px !important;
}

/* Section tag when inside a text-centred wrapper */
.section-header .section-tag,
[style*="text-align:center"] .section-tag,
[style*="text-align: center"] .section-tag {
  display: inline-block !important;
}

/* Decorative underline bar below section-header h2 */
.section-header h2 {
  position: relative;
  padding-bottom: 20px;
}
.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--yellow, #F5A623), #E09010);
  border-radius: 2px;
}

/* Page hero inner — center */
.page-hero-inner {
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  max-width: 740px;
  margin: 0 auto;
}
.page-hero-inner h1 {
  margin-bottom: 16px !important;
}
.page-hero-inner p {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Primary buttons — pulse glow */
.btn-primary {
  animation: pulse-glow 2.5s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}
.btn-primary:hover::after {
  width: 200%;
  height: 200%;
}

/* Button LINE bounce */
.btn-line {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.2s ease,
              box-shadow 0.2s ease !important;
}
.btn-line:hover {
  transform: translateY(-3px) scale(1.04) !important;
  box-shadow: 0 8px 24px rgba(6, 199, 85, 0.4) !important;
}

/* ─── Card hover enhancements ─────────────────────────────── */
.service-card,
.blog-card,
.portfolio-card,
.value-item,
.visual-card,
.faq-item {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease !important;
}

.service-card:hover {
  transform: translateY(-8px) scale(1.01) !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12) !important;
}
.blog-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 16px 48px rgba(0,0,0,0.12) !important;
}
.portfolio-card:hover {
  transform: translateY(-8px) scale(1.02) !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important;
  border-color: var(--yellow, #F5A623) !important;
}
.value-item {
  padding: 28px !important;
  border-radius: 16px !important;
  border: 1px solid transparent !important;
  transition: all 0.3s ease !important;
}
.value-item:hover {
  border-color: var(--yellow, #F5A623) !important;
  background: rgba(245, 166, 35, 0.04) !important;
  transform: translateY(-4px) !important;
}
.visual-card:hover {
  transform: translateY(-6px) scale(1.02) !important;
  box-shadow: 0 16px 40px rgba(0,0,0,0.12) !important;
}

/* ─── Heading animated underline ─────────────────────────── */
.about-mission h2,
.about-values h2,
.section-header h2,
.page-hero h1 {
  position: relative;
  display: inline-block;
}
.about-mission h2::after,
.about-values h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--yellow, #F5A623), #E09010);
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.about-mission h2.is-visible::after,
.about-values h2.is-visible::after {
  width: 60px;
}

/* ─── Process step number glow ────────────────────────────── */
.process-num {
  transition: all 0.3s ease !important;
}
.process-item:hover .process-num {
  background: var(--yellow, #F5A623) !important;
  color: var(--dark, #1A1A2E) !important;
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 4px 16px rgba(245, 166, 35, 0.4);
}

/* ─── Nav link animated underline ────────────────────────── */
.nav-links li a {
  position: relative !important;
}
.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--yellow, #F5A623);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links li a:hover::after {
  transform: scaleX(1);
}

/* ─── Stats counter pop-in ────────────────────────────────── */
.mstat,
.hero-stat .stat-number {
  transition: all 0.3s ease !important;
}
.mstat:hover {
  transform: scale(1.05) !important;
}

/* ─── FAQ item expand animation ───────────────────────────── */
.faq-a {
  animation: fadeUpIn 0.3s ease forwards;
}

/* ─── Hero section particles (CSS only) ──────────────────── */
.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  animation: floatBounce 6s ease-in-out infinite;
  pointer-events: none;
}

/* ─── Page hero section entrance ─────────────────────────── */
.page-hero {
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.08) 0%, transparent 65%);
  border-radius: 50%;
  animation: floatBounce 8s ease-in-out infinite;
  pointer-events: none;
}
.page-hero-inner {
  animation: fadeUpIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ─── CTA Banner pulse background ────────────────────────── */
.cta-banner {
  background-size: 200% 200% !important;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: floatBounce 5s ease-in-out infinite;
  pointer-events: none;
}

/* ─── Mission stats animated border ──────────────────────── */
.mission-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 32px;
}
.mstat {
  padding: 20px 24px;
  background: var(--light-bg, #F0F4F8);
  border-radius: 12px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  cursor: default;
}
.mstat:hover {
  border-color: var(--yellow, #F5A623);
  background: rgba(245, 166, 35, 0.06);
}
.mstat span {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--yellow, #F5A623);
  line-height: 1;
  margin-bottom: 4px;
}

/* ─── Service row entrance ────────────────────────────────── */
.service-row {
  transition: all 0.3s ease !important;
}
.service-row:hover .service-row-visual {
  transform: scale(1.02);
  transition: transform 0.3s ease;
}

/* ─── Scroll progress indicator ──────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--yellow, #F5A623), #E09010);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ─── Floating back-to-top ────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: var(--yellow, #F5A623);
  color: var(--dark, #1A1A2E);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  box-shadow: 0 4px 16px rgba(245, 166, 35, 0.5);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
#back-to-top:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 24px rgba(245, 166, 35, 0.6);
}

/* ════════════════════════════════════════════════════════════
   IMAGE LAYOUT CSS — section images & redesigned cards
   ════════════════════════════════════════════════════════════ */

/* ─── Global container width ─────────────────────────────── */
.container {
  max-width: 1240px !important;
}

/* ─── HERO — image right column ──────────────────────────── */
.hero-img-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.14);
}
.hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  display: block;
}

/* ─── SERVICE cards with image ────────────────────────────── */
.service-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  display: block;
  margin: -32px -32px 20px -32px;
  width: calc(100% + 64px);
}
.service-card.featured .service-card-img {
  filter: brightness(0.85);
}

/* ─── PORTFOLIO — image replacing mock-browser ───────────── */
.portfolio-real-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.portfolio-card:hover .portfolio-real-img {
  transform: scale(1.05);
}
.portfolio-mock {
  padding: 0 !important;
  min-height: unset !important;
  overflow: hidden;
  border-radius: var(--radius-lg, 20px) var(--radius-lg, 20px) 0 0;
}

/* ─── BLOG — real thumbnail images ───────────────────────── */
.blog-real-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.blog-card:hover .blog-real-thumb {
  transform: scale(1.06);
}
.blog-thumb {
  overflow: hidden !important;
}

/* ─── ABOUT — mission visual with real image ─────────────── */
.about-img-wrap {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  position: relative;
}
.about-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 20px;
}
/* stat overlay on about image */
.about-img-stat {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 14px 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  gap: 12px;
}
.about-img-stat .stat-big {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--yellow, #F5A623);
  line-height: 1;
}
.about-img-stat .stat-label {
  font-size: 0.78rem;
  color: var(--text-light, #4A5568);
  font-weight: 600;
}

/* ─── SERVICE sections with image side ───────────────────── */
/* .service-row visual: replace SVG icon with image */
.service-row-visual {
  position: relative;
  overflow: hidden;
  border-radius: 16px !important;
  min-height: 220px !important;
}
.service-row-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: transform 0.4s ease, opacity 0.3s ease;
  border-radius: 16px;
  display: block;
  position: absolute;
  inset: 0;
}
.service-row:hover .service-row-visual img {
  transform: scale(1.04);
  opacity: 1;
}
/* Keep visual-label overlay readable */
.visual-label {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  background: linear-gradient(transparent, rgba(0,0,0,0.6)) !important;
  color: white !important;
  padding: 24px 20px 16px !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  border-radius: 0 0 16px 16px !important;
  z-index: 2;
}
.visual-icon-big {
  display: none !important;
}

/* ─── Responsive adjustments ─────────────────────────────── */
@media (max-width: 768px) {
  .service-card-img {
    height: 140px;
    margin: -24px -24px 16px -24px;
    width: calc(100% + 48px);
  }
  .portfolio-real-img {
    height: 180px;
  }
  .blog-real-thumb { height: 140px; }
}

/* ─── Reduced motion preference ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .anim-fade-up,
  .anim-fade-down,
  .anim-slide-left,
  .anim-slide-right,
  .anim-zoom-in,
  .anim-rotate-in {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }
  .btn-primary { animation: none !important; }
  .section-tag { animation: none !important; }
}

/* ─── HERO floating cards — contained within hero-visuals ─── */
.hero-visuals[data-astro-cid-bbe6dxrz] {
  overflow: hidden !important;
  border-radius: 20px;
}
.hero-card-main[data-astro-cid-bbe6dxrz] {
  right: 8px !important;
  top: 8px !important;
}
.hero-stat[data-astro-cid-bbe6dxrz] {
  left: 8px !important;
  top: 110px !important;
}
.hero-card-secondary[data-astro-cid-bbe6dxrz] {
  right: 8px !important;
  bottom: 30px !important;
}
.hero-badge[data-astro-cid-bbe6dxrz] {
  left: 8px !important;
  bottom: 140px !important;
}
.hero-grid[data-astro-cid-bbe6dxrz] {
  align-items: stretch !important;
}
.hero-content[data-astro-cid-bbe6dxrz] {
  align-self: center;
}

/* ─── Clip any overflow from hero section & container ──── */
body { overflow-x: hidden !important; }
.hero[data-astro-cid-bbe6dxrz] { overflow: hidden !important; }

/* ════════════════════════════════════════════════════════
   SERVICES BENTO GRID — homepage redesign
   Layout: [Large Left | Small | Small]
            [Large Left | Wide Bottom Spanning 2 cols]
════════════════════════════════════════════════════════ */
.services[data-astro-cid-g5jplrhu] {
  background: #f4f7fb !important;
}

.services-grid[data-astro-cid-g5jplrhu] {
  display: grid !important;
  grid-template-columns: 1.1fr 1fr 1fr !important;
  grid-template-rows: 280px 220px !important;
  gap: 16px !important;
  margin-bottom: 48px !important;
}

/* Card 1 — Featured (Web Design): large left, 2 rows tall */
.service-card.featured[data-astro-cid-g5jplrhu] {
  grid-column: 1 !important;
  grid-row: 1 / 3 !important;
  background: var(--dark, #1A1A2E) !important;
  color: white !important;
  border: none !important;
  border-radius: 20px !important;
  padding: 0 !important;
  overflow: hidden !important;
  position: relative !important;
}
/* bg image overlay on featured card */
.service-card.featured[data-astro-cid-g5jplrhu]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/images/services_bg_webdev.png') center/cover no-repeat;
  opacity: 0.45;
  z-index: 0;
  transition: opacity 0.4s ease;
}
.service-card.featured[data-astro-cid-g5jplrhu]:hover::before {
  opacity: 0.6;
}
/* Content inside featured sits above the bg */
.service-card.featured[data-astro-cid-g5jplrhu] > * {
  position: relative;
  z-index: 1;
}
/* Gradient overlay at bottom of featured card */
.service-card.featured[data-astro-cid-g5jplrhu]::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 65%;
  background: linear-gradient(transparent, rgba(10,10,30,0.92));
  z-index: 0;
  border-radius: 0 0 20px 20px;
  pointer-events: none;
}
/* Push featured card inner content to bottom */
.service-card.featured[data-astro-cid-g5jplrhu] {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  padding: 28px !important;
}
.service-card.featured[data-astro-cid-g5jplrhu] .card-header[data-astro-cid-g5jplrhu] {
  display: none !important;
}
.service-card.featured[data-astro-cid-g5jplrhu] h3[data-astro-cid-g5jplrhu] {
  font-size: 1.4rem !important;
  color: white !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 10px !important;
}
.service-card.featured[data-astro-cid-g5jplrhu] p[data-astro-cid-g5jplrhu] {
  color: rgba(255,255,255,0.8) !important;
  font-size: 0.875rem !important;
  margin-bottom: 20px !important;
}
.service-card.featured[data-astro-cid-g5jplrhu] .card-arrow[data-astro-cid-g5jplrhu] {
  display: inline-flex !important;
  background: white !important;
  color: var(--dark, #1A1A2E) !important;
  padding: 10px 20px !important;
  border-radius: 50px !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  width: fit-content !important;
}
.service-card.featured[data-astro-cid-g5jplrhu] .card-arrow[data-astro-cid-g5jplrhu] svg {
  stroke: var(--dark) !important;
}

/* Cards 2 & 3 — Small top-right (dark style) */
.service-card[data-astro-cid-g5jplrhu]:nth-child(2),
.service-card[data-astro-cid-g5jplrhu]:nth-child(3) {
  grid-row: 1 !important;
  background: var(--dark, #1A1A2E) !important;
  color: white !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 18px !important;
  padding: 28px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}
.service-card[data-astro-cid-g5jplrhu]:nth-child(2) h3,
.service-card[data-astro-cid-g5jplrhu]:nth-child(3) h3 {
  color: white !important;
  font-size: 1.05rem !important;
  text-transform: uppercase;
}
.service-card[data-astro-cid-g5jplrhu]:nth-child(2) p,
.service-card[data-astro-cid-g5jplrhu]:nth-child(3) p {
  color: rgba(255,255,255,0.65) !important;
  font-size: 0.83rem !important;
  line-height: 1.6 !important;
}
.service-card[data-astro-cid-g5jplrhu]:nth-child(2) .service-tag,
.service-card[data-astro-cid-g5jplrhu]:nth-child(3) .service-tag {
  background: rgba(245,166,35,0.2) !important;
  color: var(--yellow, #F5A623) !important;
  border: none !important;
}
.service-card[data-astro-cid-g5jplrhu]:nth-child(2) .service-icon,
.service-card[data-astro-cid-g5jplrhu]:nth-child(3) .service-icon {
  background: rgba(255,255,255,0.08) !important;
  color: var(--yellow, #F5A623) !important;
}
.service-card[data-astro-cid-g5jplrhu]:nth-child(2) .card-arrow,
.service-card[data-astro-cid-g5jplrhu]:nth-child(3) .card-arrow { display: none !important; }

/* Card 4 — Wide bottom (spans col 2+3) */
.service-card[data-astro-cid-g5jplrhu]:nth-child(4) {
  grid-column: 2 / 4 !important;
  grid-row: 2 !important;
  background: var(--dark, #1A1A2E) !important;
  color: white !important;
  border: none !important;
  border-radius: 18px !important;
  padding: 0 !important;
  overflow: hidden !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
}
.service-card[data-astro-cid-g5jplrhu]:nth-child(4)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/images/services_bg_automation.png') center/cover no-repeat;
  opacity: 0.35;
  transition: opacity 0.4s ease;
}
.service-card[data-astro-cid-g5jplrhu]:nth-child(4):hover::before { opacity: 0.5; }
.service-card[data-astro-cid-g5jplrhu]:nth-child(4)::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10,10,30,0.85) 0%, rgba(10,10,30,0.5) 60%, transparent);
  pointer-events: none;
}
.service-card[data-astro-cid-g5jplrhu]:nth-child(4) > * { position: relative; z-index: 1; }
.service-card[data-astro-cid-g5jplrhu]:nth-child(4) {
  padding: 28px !important;
}
.service-card[data-astro-cid-g5jplrhu]:nth-child(4) .card-header { display: none !important; }
.service-card[data-astro-cid-g5jplrhu]:nth-child(4) h3 {
  color: white !important;
  font-size: 1.1rem !important;
  text-transform: uppercase;
  margin-bottom: 6px !important;
}
.service-card[data-astro-cid-g5jplrhu]:nth-child(4) p {
  color: rgba(255,255,255,0.7) !important;
  font-size: 0.85rem !important;
  max-width: 480px;
}
.service-card[data-astro-cid-g5jplrhu]:nth-child(4) .card-arrow { display: none !important; }

/* Hover lift for all service cards */
.service-card[data-astro-cid-g5jplrhu]:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2) !important;
}

/* Responsive: stack on mobile */
@media (max-width: 900px) {
  .services-grid[data-astro-cid-g5jplrhu] {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
  }
  .service-card.featured[data-astro-cid-g5jplrhu] {
    grid-column: 1 !important;
    grid-row: auto !important;
    min-height: 300px;
  }
  .service-card[data-astro-cid-g5jplrhu]:nth-child(2),
  .service-card[data-astro-cid-g5jplrhu]:nth-child(3) { grid-row: auto !important; }
  .service-card[data-astro-cid-g5jplrhu]:nth-child(4) {
    grid-column: 1 !important;
    grid-row: auto !important;
    min-height: 200px;
  }
}

/* ─── Poppins for English headings ───────────────────────
   Browser auto-selects: Poppins (English) → Noto Sans Thai (ไทย)
─────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.logo-main,
.section-tag,
.service-tag,
.card-tag,
.card-mini-tag,
.stat-number,
.value-num,
.process-num,
.portfolio-type,
.blog-cat,
.btn-primary,
.btn-outline,
.btn-white-outline,
.btn-line,
.nav-links a,
.service-price {
  font-family: 'Poppins', 'Noto Sans Thai', 'Sarabun', sans-serif !important;
}

/* ─── Performance: contain layout/paint for card sections ── */
.services-grid[data-astro-cid-g5jplrhu],
.portfolio-grid[data-astro-cid-uhrerali],
.blog-grid[data-astro-cid-sz7xmlte] {
  contain: layout style;
}
.service-card[data-astro-cid-g5jplrhu],
.portfolio-card[data-astro-cid-uhrerali],
.blog-card[data-astro-cid-sz7xmlte] {
  content-visibility: auto;
  contain-intrinsic-size: 0 300px;
}
/* Smooth font rendering */
* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
/* Faster tap response on mobile */
a, button { touch-action: manipulation; }

/* ─── Non-composited animations fix ──────────────────────
   Replace any animations that change layout properties
   (width, height, margin, padding, border-radius, top, left)
   with GPU-composited transform/opacity equivalents
─────────────────────────────────────────────────────── */

/* Rewrite lineGrow with transform instead of width */
@keyframes lineGrow {
  from { transform: scaleX(0); transform-origin: left; }
  to   { transform: scaleX(1); transform-origin: left; }
}
.section-header h2::after {
  transform-origin: left center;
  transform: scaleX(0) translateX(-50%);
}
.section-header h2::after {
  transform-origin: center;
}
.about-mission h2.is-visible::after,
.about-values h2.is-visible::after {
  animation: lineGrow 0.6s cubic-bezier(0.22,1,0.36,1) forwards !important;
}

/* Rewrite floatBounce: use only transform (already OK) */
/* Rewrite pulse-glow: use transform scale instead of box-shadow width change */
@keyframes pulse-glow {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245,166,35,0.3); }
  50%       { transform: scale(1.01); box-shadow: 0 0 0 8px rgba(245,166,35,0); }
}

/* Fix gradientShift — background-position is composited in modern browsers, OK */

/* Ripple on btn-primary: use transform instead of width/height */
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.2);
  border-radius: inherit;
  transform: scale(0);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}
.btn-primary:hover::after {
  transform: scale(1);
  opacity: 1;
}

/* will-change only on actively animating elements */
.anim-fade-up, .anim-fade-down,
.anim-slide-left, .anim-slide-right,
.anim-zoom-in, .anim-rotate-in {
  will-change: transform, opacity;
}
.anim-fade-up.is-visible, .anim-fade-down.is-visible,
.anim-slide-left.is-visible, .anim-slide-right.is-visible,
.anim-zoom-in.is-visible, .anim-rotate-in.is-visible {
  will-change: auto;
}

/* Promote hero bg elements to their own layer */
.hero::after,
.page-hero::before,
.cta-banner::before {
  will-change: transform;
}

/* Reduce heavy animations on mobile for perf */
@media (max-width: 768px) {
  .hero::after { display: none; }
  .page-hero::before { display: none; }
  .cta-banner::before { display: none; }
  .btn-primary { animation-duration: 4s; }
  .section-tag { animation-duration: 5s; }
}
