/* ============================================
   ANIMATIONS.CSS - First Avenue Publishing
   Drop this file and add the JS snippet below
   ============================================ */

/* ── Keyframes ─────────────────────────────── */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-40px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(50px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.05); }
}

@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

@keyframes borderGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(64, 190, 226, 0); }
  50%       { box-shadow: 0 0 0 8px rgba(64, 190, 226, 0.2); }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Scroll-reveal base state ───────────────── */
/* Elements start invisible; JS adds .visible when in view */

.anim-fade-up,
.anim-fade-down,
.anim-fade-left,
.anim-fade-right,
.anim-zoom {
  opacity: 0;
  transition-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
}

.anim-fade-up    { transform: translateY(40px);  transition: opacity 0.7s, transform 0.7s; }
.anim-fade-down  { transform: translateY(-40px); transition: opacity 0.7s, transform 0.7s; }
.anim-fade-left  { transform: translateX(-50px); transition: opacity 0.7s, transform 0.7s; }
.anim-fade-right { transform: translateX(50px);  transition: opacity 0.7s, transform 0.7s; }
.anim-zoom       { transform: scale(0.85);        transition: opacity 0.7s, transform 0.7s; }

.anim-fade-up.visible,
.anim-fade-down.visible,
.anim-fade-left.visible,
.anim-fade-right.visible,
.anim-zoom.visible {
  opacity: 1;
  transform: none;
}

/* Staggered delays for grid children */
.anim-stagger > *:nth-child(1) { transition-delay: 0.05s; }
.anim-stagger > *:nth-child(2) { transition-delay: 0.15s; }
.anim-stagger > *:nth-child(3) { transition-delay: 0.25s; }
.anim-stagger > *:nth-child(4) { transition-delay: 0.35s; }
.anim-stagger > *:nth-child(5) { transition-delay: 0.45s; }
.anim-stagger > *:nth-child(6) { transition-delay: 0.55s; }

/* ── Section 1 – Hero ───────────────────────── */

section.sec_1 .banner_inner h5 {
  animation: fadeInDown 0.7s ease both;
}
section.sec_1 .banner_inner h2 {
  animation: fadeInDown 0.85s 0.15s ease both;
}
section.sec_1 .banner_inner p {
  animation: fadeInUp 0.85s 0.3s ease both;
}
section.sec_1 .banner_btn {
  animation: fadeInUp 0.85s 0.45s ease both;
}
section.sec_1 .banner_img {
  animation: zoomIn 1s 0.2s ease both;
}

/* Hero image gentle float */
section.sec_1 .banner_img img {
  animation: floatY 4s ease-in-out infinite;
}

/* ── Buttons – hover lift ───────────────────── */

button.btn-dark,
a.global_wrap,
.banner_btn a,
.cta_row button.btn-dark {
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.3s ease !important;
}
button.btn-dark:hover,
a.global_wrap:hover,
.banner_btn a:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(64, 190, 226, 0.35) !important;
}

/* ── Service icon boxes – hover lift + glow ─── */

.icon_box {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.icon_box:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(64, 190, 226, 0.2) !important;
}

/* ── Testimonial boxes – hover card lift ─────── */

.testimonial_box {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.testimonial_box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12) !important;
}

/* ── qr benefit boxes – border glow ─────────── */

.qr_box {
  border-radius: 10px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.qr_box:hover {
  box-shadow: 0 0 0 2px #40bee2, 0 8px 24px rgba(64, 190, 226, 0.15);
  transform: translateY(-4px);
}

/* ── Project / portfolio boxes ───────────────── */

.project_box {
  overflow: hidden;
  transition: transform 0.3s ease;
}
.project_box img {
  transition: transform 0.4s ease;
}
.project_box:hover {
  transform: translateY(-4px);
}
.project_box:hover img {
  transform: scale(1.05);
}

/* ── Counter section – number pulse on appear ── */

section.sec_12 .counter {
  animation: countUp 0.8s ease both;
}
section.sec_12 .col-md-4:nth-child(2) .counter { animation-delay: 0.15s; }
section.sec_12 .col-md-4:nth-child(3) .counter { animation-delay: 0.30s; }

.count-title {
  transition: color 0.3s ease;
}

/* ── Nav links underline slide ───────────────── */

nav.navbar ul.navbar-nav li a {
  position: relative;
}
nav.navbar ul.navbar-nav li a::after {
  content: '';
  display: block;
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: #40bee2;
  transition: width 0.3s ease;
}
nav.navbar ul.navbar-nav li a:hover::after {
  width: 100%;
}

/* ── CTA rows – shimmer on the headline ─────── */

.simple_text h3 {
  background: linear-gradient(90deg, #181818 40%, #40bee2 50%, #181818 60%);
  background-size: 800px 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* ── Process boxes – step-in left/right ─────── */

.proces_box {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  border-radius: 10px;
  padding: 15px;
}
.proces_box:hover {
  box-shadow: 0 6px 20px rgba(64, 190, 226, 0.15);
  transform: translateY(-3px);
}

/* ── Learning / CTA card boxes ───────────────── */

.learing_inner {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.learing_inner:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
  transform: translateY(-4px);
}

/* ── Logo slider – subtle fade edges ─────────── */

.logos_div {
  position: relative;
}
.logos_div::before,
.logos_div::after {
  content: '';
  position: absolute;
  top: 0;
  width: 80px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}
.logos_div::before { left: 0;  background: linear-gradient(to right, #fff, transparent); }
.logos_div::after  { right: 0; background: linear-gradient(to left,  #fff, transparent); }

/* ── Footer links ────────────────────────────── */

.footer_inner ul li a,
.footer_inner ul.service_points li a {
  transition: color 0.25s ease, padding-left 0.25s ease !important;
}
.footer_inner ul li a:hover,
.footer_inner ul.service_points li a:hover {
  padding-left: 6px !important;
}

/* ── Badges list – zoom on hover ─────────────── */

.badges_inner ul li {
  transition: transform 0.3s ease;
}
.badges_inner ul li:hover {
  transform: scale(1.08);
}

/* ── Contact icons bounce ─────────────────────── */

.contact_wraping ul li img {
  transition: transform 0.3s ease;
}
.contact_wraping ul li:hover img {
  transform: rotate(-10deg) scale(1.1);
}

/* ── Reduced motion – respect user preference ── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .anim-fade-up, .anim-fade-down,
  .anim-fade-left, .anim-fade-right, .anim-zoom {
    opacity: 1;
    transform: none;
  }
}
