/* ===================================
   TOUT FLASH LLC - Custom Styles
   High-Performance Media Advertising
   Color Palette: Electric Blue & Neon Accents
   =================================== */

:root {
  /* Primary Colors - Electric Blue Theme */
  --tf-primary: #0066FF;
  --tf-primary-light: #00E5FF;
  --tf-primary-dark: #0052CC;
  
  /* Accent Colors */
  --tf-accent: #00E5FF;
  --tf-accent-glow: rgba(0, 229, 255, 0.3);
  
  /* Gradients */
  --tf-gradient-primary: linear-gradient(135deg, #0066FF 0%, #00E5FF 100%);
  --tf-gradient-reverse: linear-gradient(135deg, #00E5FF 0%, #0066FF 100%);
  --tf-gradient-bolt: linear-gradient(180deg, #00E5FF 0%, #0099FF 50%, #0066FF 100%);
  
  /* Semantic Colors */
  --tf-success: #00FF88;
  --tf-warning: #FFB800;
  --tf-error: #FF3366;
  
  /* Performance Optimization */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --shadow-glow: 0 0 30px var(--tf-accent-glow);
  --shadow-blue: 0 0 20px rgba(0, 102, 255, 0.4);
}

/* Performance Optimization - Hardware Acceleration */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.animate_top,
.animate_left,
.animate_right {
  will-change: transform, opacity;
  transform: translateZ(0);
}

/* Custom Button Styles with Tout Flash Branding */
.gh {
  background: var(--tf-gradient-primary) !important;
  box-shadow: 0 4px 20px rgba(0, 102, 255, 0.4);
  transition: all var(--transition-fast);
}

.gh:hover {
  box-shadow: 0 6px 30px rgba(0, 229, 255, 0.6);
  transform: translateY(-2px);
}

/* Accent Color Override for Links and Highlights */
.mk,
a.mk {
  color: var(--tf-accent) !important;
}

/* Logo Glow Effect on Hover */
header img[src*="toutflash-logo"] {
  transition: all var(--transition-normal);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

header img[src*="toutflash-logo"]:hover {
  filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.6)) 
          drop-shadow(0 0 20px rgba(0, 102, 255, 0.4));
  transform: scale(1.03);
  transition: all var(--transition-normal);
}

/* Enhanced Logo Visibility */
.ec img[src*="toutflash-logo"] {
  min-height: 56px;
  height: auto;
  width: auto;
  max-width: 280px;
}

/* Logo in Footer - Blue Glow */
footer img[src*="toutflash-logo"] {
  filter: drop-shadow(0 0 8px rgba(0, 102, 255, 0.3));
}

footer img[src*="toutflash-logo"]:hover {
  filter: drop-shadow(0 0 15px rgba(0, 229, 255, 0.6))
          drop-shadow(0 0 25px rgba(0, 102, 255, 0.4));
}

/* Enhanced Card Hover Effects */
.sg:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(0, 102, 255, 0.15);
  transition: all var(--transition-normal);
}

/* Stat Counter Animation */
.gk {
  background: var(--tf-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Form Input Focus States */
input:focus,
textarea:focus {
  border-color: var(--tf-primary) !important;
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1) !important;
  outline: none;
}

/* CTA Section Enhancement */
.pg.gh {
  background: var(--tf-gradient-primary);
  position: relative;
  overflow: hidden;
}

.pg.gh::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.1) 0%, transparent 70%);
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

/* Loading Performance Optimization */
img {
  content-visibility: auto;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mobile Optimization */
@media (max-width: 768px) {
  .gh {
    box-shadow: 0 2px 15px rgba(0, 102, 255, 0.3);
  }
  
  .sg:hover {
    transform: none;
  }
}

/* Dark Mode Enhancements */
.b.eh {
  background-color: #0A0E27;
}

.b.eh .gh {
  box-shadow: 0 4px 25px rgba(0, 229, 255, 0.4);
}

/* Section Backgrounds with Subtle Gradients */
.fh.rm {
  background: linear-gradient(180deg, transparent 0%, rgba(0, 102, 255, 0.03) 100%);
}

/* Improve Button Contrast */
.lk.gh,
.gh.sl {
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Newsletter Input Styling */
.gm {
  background: var(--tf-gradient-primary);
}

/* Pricing Card Active State */
.rj.sg:hover .gh {
  transform: scale(1.05);
}

/* Footer Link Hover */
.sc.xl.vb:hover {
  color: var(--tf-accent);
  padding-left: 8px;
  transition: all var(--transition-fast);
}

/* Performance: Defer Off-screen Images */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Service Icons Glow Effect */
.cf.ae.cd {
  transition: all var(--transition-normal);
}

.cf.ae.cd:hover {
  box-shadow: var(--shadow-glow);
  transform: scale(1.1);
}

/* Counter Section Stat Highlighting */
.me\\/5.ln {
  transition: transform var(--transition-normal);
}

.me\\/5.ln:hover {
  transform: scale(1.05);
}

/* Project Tab Active State Enhancement */
.project-tab-btn.gh.lk {
  border-bottom: 3px solid var(--tf-accent);
}

/* Home pricing toggle knob */
.pricing-switch-knob {
  width: 26px;
  height: 26px;
  background: #ffffff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  box-shadow: 0 3px 10px rgba(15, 30, 55, 0.32);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease;
  z-index: 2;
  display: block;
}

.pricing-switch-knob.is-annual {
  transform: translateX(28px);
}

/* Keep home pricing content fully readable (avoid washed-out reveal state) */
.home-pricing .animate_top {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

.home-solutions .animate_top {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

/* Project Items Display Fix */
.projects-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  overflow: visible;
}

.project-item {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  margin-bottom: 20px;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

.project-item > div {
  width: 100%;
  height: 100%;
}

.project-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 3/2;
  background-color: #f5f5f5;
}

/* Project Item Hover Effect */
.project-item:hover img {
  transform: scale(1.05);
  transition: transform 0.4s ease;
}

/* Project Overlay */
.project-item .df.nl {
  transition: opacity 0.3s ease;
}

/* Optimize Font Loading */
@font-face {
  font-family: 'Inter';
  font-display: swap;
}

/* Critical CSS - Above the Fold Optimization */
.fk.vj.zp {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* Accessibility: Focus Visible */
*:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 2px;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Back to Top Button Enhancement */
.uc {
  background: var(--tf-gradient-primary) !important;
  box-shadow: 0 4px 20px rgba(0, 102, 255, 0.4);
}

/* Unified style system for all independent pages */
body.tf-subpage {
  background:
    radial-gradient(circle at 8% 10%, rgba(0, 229, 255, 0.14), transparent 35%),
    radial-gradient(circle at 92% 14%, rgba(0, 102, 255, 0.16), transparent 38%),
    linear-gradient(180deg, #f8fbff 0%, #f1f7ff 60%, #ecf4ff 100%);
  min-height: 100vh;
}

body.tf-subpage main {
  position: relative;
}

body.tf-subpage main::before {
  content: "";
  position: absolute;
  top: 40px;
  left: 6%;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(0, 102, 255, 0.14) 0%, rgba(0, 102, 255, 0) 72%);
  pointer-events: none;
}

body.tf-subpage header.g.ja.ki {
  background: rgba(8, 20, 40, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 229, 255, 0.2);
  box-shadow: 0 10px 35px rgba(5, 15, 32, 0.28);
}

body.tf-subpage section.gj.do.ir.hj.sp.jr.i.pg.fh.rm {
  margin-top: 32px;
}

body.tf-subpage .animate_top.jn\/2 {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(0, 102, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 76, 153, 0.12);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: clamp(1.25rem, 2.5vw, 2rem);
}

body.tf-subpage .animate_top.jn\/2 h1 {
  letter-spacing: -0.03em;
}

body.tf-subpage .animate_top.jn\/2 ul {
  margin-top: 0.75rem;
}

body.tf-subpage .animate_top.jn\/2 ul li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

body.tf-subpage .vc.ek.kk.hc.rg.lk.gh.sl.ml.il._l.gi.hi,
body.tf-subpage .vc.ek.kk.hh.rg.ol.il.cm.gi.hi,
body.tf-subpage .lk.gh.dk.rg.tc.wf.xf._l.gi.hi {
  border: 1px solid rgba(0, 229, 255, 0.38);
}

body.tf-subpage footer.ji.gh {
  margin-top: 1.5rem;
  border-top: 1px solid rgba(0, 229, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
  body.tf-subpage .animate_top.jn\/2 {
    border-radius: 16px;
    padding: 1rem;
  }
}

/* ===================================
   Subpage Premium Redesign (Global)
   =================================== */

body.tf-subpage {
  --tf-page-ink: #0f1f39;
  --tf-page-muted: #4a5b78;
  --tf-surface: rgba(255, 255, 255, 0.86);
  --tf-surface-strong: rgba(255, 255, 255, 0.96);
  --tf-outline: rgba(0, 102, 255, 0.16);
  --tf-glow: rgba(0, 229, 255, 0.2);
  --tf-shadow-lg: 0 28px 64px rgba(13, 40, 86, 0.16);
  color: var(--tf-page-ink);
  font-family: "Manrope", "Segoe UI", Tahoma, sans-serif;
  background:
    radial-gradient(circle at 6% 8%, rgba(0, 229, 255, 0.2), transparent 34%),
    radial-gradient(circle at 88% 10%, rgba(0, 102, 255, 0.25), transparent 36%),
    linear-gradient(180deg, #f4f9ff 0%, #edf5ff 58%, #e7f0ff 100%);
}

body.tf-subpage .fk,
body.tf-subpage h1,
body.tf-subpage h2,
body.tf-subpage h3,
body.tf-subpage h4 {
  font-family: "Space Grotesk", "Segoe UI", Tahoma, sans-serif;
}

body.tf-subpage .fq,
body.tf-subpage p,
body.tf-subpage li {
  color: var(--tf-page-muted);
  line-height: 1.72;
}

body.tf-subpage header.g.ja.ki {
  position: sticky;
  top: 0;
  z-index: 90;
  background: linear-gradient(115deg, rgba(8, 24, 52, 0.9) 0%, rgba(9, 36, 77, 0.84) 65%, rgba(0, 102, 255, 0.5) 100%);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 229, 255, 0.3);
  box-shadow: 0 14px 42px rgba(8, 20, 42, 0.3);
}

body.tf-subpage header.g.ja.ki > div.bb.ze.ki.xn.oo.wf.yf.i {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

body.tf-subpage header .vd.to\/4.tc.wf.yf {
  width: auto;
  flex: 0 0 auto;
}

body.tf-subpage header a.lk.gh.dk.rg.tc.wf.xf._l.gi.hi {
  border: 1px solid rgba(0, 229, 255, 0.36);
  box-shadow: 0 12px 28px rgba(0, 102, 255, 0.35);
  transform: translateY(0);
}

body.tf-subpage header a.lk.gh.dk.rg.tc.wf.xf._l.gi.hi:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 16px 34px rgba(0, 229, 255, 0.33);
}

body.tf-subpage main {
  padding-top: clamp(1rem, 2vw, 2rem);
  padding-bottom: clamp(1.4rem, 2.5vw, 2.6rem);
}

body.tf-subpage section.gj.do.ir.hj.sp.jr.i.pg.fh.rm {
  margin-top: 0;
  padding-top: clamp(1.1rem, 2.3vw, 2rem);
}

body.tf-subpage section.gj.do.ir.hj.sp.jr.i.pg.fh.rm > div.bb.ze.ki.xn {
  position: relative;
}

body.tf-subpage section.gj.do.ir.hj.sp.jr.i.pg.fh.rm > div.bb.ze.ki.xn::before {
  content: "";
  position: absolute;
  top: -16px;
  right: 8%;
  width: 170px;
  height: 170px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.24) 0%, rgba(0, 229, 255, 0) 72%);
  pointer-events: none;
}

body.tf-subpage .tc.sf.yo.zf.wf {
  max-width: 1060px;
  margin: 0 auto;
  display: block !important;
}

body.tf-subpage .animate_top.jn\/2 {
  width: 100% !important;
  max-width: 100% !important;
}

body.tf-subpage .animate_top,
body.tf-subpage .animate_top.jn\/2 {
  position: relative;
  background:
    linear-gradient(152deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 250, 255, 0.94) 100%);
  border: 1px solid var(--tf-outline);
  border-radius: 22px;
  box-shadow: var(--tf-shadow-lg);
  padding: clamp(1.15rem, 2.3vw, 2rem);
  overflow: hidden;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

body.tf-subpage .animate_top::before,
body.tf-subpage .animate_top.jn\/2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #00e5ff 0%, #0066ff 48%, #00a4ff 100%);
}

body.tf-subpage .animate_top::after,
body.tf-subpage .animate_top.jn\/2::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(0, 102, 255, 0.16), rgba(0, 102, 255, 0));
  pointer-events: none;
}

body.tf-subpage h1.fk.vj.zp.or.kk.wm.wb {
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: 0.9rem;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

body.tf-subpage h3.kk.wm.tj {
  color: #0a2a55;
  font-size: clamp(1.05rem, 2.2vw, 1.24rem);
  margin-bottom: 0.55rem;
}

body.tf-subpage h4.kk.wm {
  color: #113362;
  font-size: clamp(0.98rem, 2vw, 1.1rem);
  margin-bottom: 0.35rem;
}

body.tf-subpage .tc.tf.yo.zf {
  margin-top: 1.1rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: var(--tf-surface-strong);
  border: 1px solid rgba(0, 102, 255, 0.12);
  box-shadow: 0 10px 24px rgba(10, 37, 76, 0.07);
}

body.tf-subpage .fq,
body.tf-subpage p,
body.tf-subpage li,
body.tf-subpage em {
  color: #2f4363 !important;
}

body.tf-subpage h3.kk.wm.tj,
body.tf-subpage h4.kk.wm,
body.tf-subpage strong {
  color: #0f2e57 !important;
}

body.tf-subpage .tc.tf.yo.zf:hover {
  border-color: rgba(0, 229, 255, 0.28);
  transform: translateY(-1px);
  transition: all 0.25s ease;
}

body.tf-subpage ul.lc {
  margin-top: 0.65rem;
  padding-left: 0;
  list-style: none;
}

body.tf-subpage ul.lc li {
  position: relative;
  padding-left: 1.45rem;
  margin-bottom: 0.6rem;
}

body.tf-subpage ul.lc li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.54rem;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #00e5ff 0%, #0066ff 100%);
  box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.13);
}

body.tf-subpage a.vc.ek.kk.hc.rg.lk.gh.sl.ml.il._l.gi.hi,
body.tf-subpage a.vc.ek.kk.hh.rg.ol.il.cm.gi.hi {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(0, 229, 255, 0.32);
  box-shadow: 0 14px 30px rgba(0, 102, 255, 0.31);
  letter-spacing: 0.01em;
}

body.tf-subpage a.vc.ek.kk.hc.rg.lk.gh.sl.ml.il._l.gi.hi svg,
body.tf-subpage a.vc.ek.kk.hh.rg.ol.il.cm.gi.hi svg {
  display: inline-block !important;
  width: 14px;
  height: 14px;
  margin: 0 !important;
  vertical-align: middle;
  flex: 0 0 auto;
}

body.tf-subpage a.vc.ek.kk.hc.rg.lk.gh.sl.ml.il._l.gi.hi:hover,
body.tf-subpage a.vc.ek.kk.hh.rg.ol.il.cm.gi.hi:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0, 229, 255, 0.3);
}

body.tf-subpage footer.ji.gh {
  margin-top: clamp(1.4rem, 2vw, 2rem);
  background:
    linear-gradient(145deg, rgba(9, 29, 60, 0.96) 0%, rgba(4, 20, 44, 0.95) 100%);
  border-top: 1px solid rgba(0, 229, 255, 0.28);
}

body.tf-subpage footer.ji.gh .tc.wf.xf {
  max-width: 1060px;
  margin: 0 auto;
  min-height: 84px;
  gap: 1rem;
}

body.tf-subpage footer.ji.gh p,
body.tf-subpage footer.ji.gh a {
  color: rgba(231, 242, 255, 0.92);
}

body.tf-subpage footer.ji.gh .animate_top {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

body.tf-subpage footer.ji.gh .animate_top::before,
body.tf-subpage footer.ji.gh .animate_top::after {
  content: none !important;
}

body.tf-subpage footer.ji.gh .xl {
  color: #eaf4ff !important;
  opacity: 1 !important;
  font-weight: 600;
}

body.tf-subpage footer.ji.gh a:hover {
  color: #00e5ff;
}

@media (max-width: 900px) {
  body.tf-subpage header.g.ja.ki > div.bb.ze.ki.xn.oo.wf.yf.i {
    min-height: 78px;
  }

  body.tf-subpage .animate_top,
  body.tf-subpage .animate_top.jn\/2 {
    border-radius: 18px;
    padding: 1rem;
  }

  body.tf-subpage .tc.tf.yo.zf {
    padding: 0.82rem 0.84rem;
  }
}

@media (max-width: 680px) {
  body.tf-subpage header.g.ja.ki > div.bb.ze.ki.xn.oo.wf.yf.i {
    flex-direction: column;
    align-items: stretch;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    min-height: auto;
  }

  body.tf-subpage header .vd.to\/4.tc.wf.yf {
    justify-content: center;
  }

  body.tf-subpage header a.lk.gh.dk.rg.tc.wf.xf._l.gi.hi,
  body.tf-subpage a.vc.ek.kk.hc.rg.lk.gh.sl.ml.il._l.gi.hi,
  body.tf-subpage a.vc.ek.kk.hh.rg.ol.il.cm.gi.hi {
    width: 100%;
    justify-content: center;
  }

  body.tf-subpage footer.ji.gh .tc.wf.xf {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
  }
}
