/* =========================================================================
   EdJo Research Solutions — Professional-site patterns layer
   Purely additive: new elements/classes only. Does not rename, remove, or
   restyle any existing form fields, IDs, or JS hooks used by
   email_handler.php / chat_handler.php / config.php.
   ========================================================================= */

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---- Header gains a subtle shadow once the page is scrolled, so it reads
   as "lifted" over content instead of always floating flat ---- */
header.ep-scrolled {
  box-shadow: 0 8px 30px rgba(26, 32, 44, 0.25);
}

/* ---- "Available for new projects" status pill — common on top
   freelancer/agency sites (Toptal, Upwork Pro profiles) to signal
   capacity at a glance ---- */
.ep-availability {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #0f9d70;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.ep-availability .ep-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.6);
  animation: ep-pulse 2s infinite;
}
@keyframes ep-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .ep-availability .ep-dot { animation: none; }
}

/* ---- Card hover lift — a small, consistent hover state across every
   *-card class (service/portfolio/pricing/testimonial/credential) so the
   whole site feels tactile, not just individual sections ---- */
[class$="-card"] {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
[class$="-card"]:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(26, 32, 44, 0.12);
}
@media (hover: none) {
  /* touch devices: skip the hover lift, it just causes a "stuck" state */
  [class$="-card"]:hover {
    transform: none;
  }
}

/* ---- WhatsApp floating button — bottom-LEFT so it never collides with
   the homepage chat widget or back-to-top button, both bottom-right ---- */
.ep-whatsapp-fab {
  position: fixed;
  left: 20px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #25D366;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
  z-index: 998;
  min-height: 44px;
}
.ep-whatsapp-fab:hover {
  filter: brightness(1.05);
}
@media (max-width: 768px) {
  .ep-whatsapp-fab {
    left: 14px;
    bottom: 84px;
    padding: 0.65rem 0.9rem;
    font-size: 0.85rem;
  }
}

/* ---- Back-to-top button ---- */
#epBackToTop {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary, #667eea) 0%, var(--secondary, #764ba2) 100%);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 998;
}
#epBackToTop.ep-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
/* if the site's own chat widget is open in the same bottom-right corner,
   nudge the back-to-top button up so they don't collide */
.chat-widget ~ #epBackToTop {
  bottom: 90px;
}

/* ---- Sticky mobile bottom CTA bar — standard pattern on freelancer/
   agency sites to keep "get in touch" one tap away on small screens,
   without competing with the desktop header ---- */
.ep-mobile-cta {
  display: none;
}
@media (max-width: 768px) {
  .ep-mobile-cta {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: #fff;
    border-top: 1px solid var(--border, #e2e8f0);
    box-shadow: 0 -6px 20px rgba(26, 32, 44, 0.12);
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    gap: 10px;
  }
  .ep-mobile-cta a {
    flex: 1;
    text-align: center;
    padding: 0.8rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .ep-mobile-cta .ep-cta-primary {
    background: linear-gradient(135deg, var(--primary, #667eea) 0%, var(--secondary, #764ba2) 100%);
    color: #fff;
  }
  .ep-mobile-cta .ep-cta-secondary {
    background: var(--light, #f7fafc);
    color: var(--text, #2d3748);
    border: 1px solid var(--border, #e2e8f0);
  }
  /* give the page enough bottom breathing room that the bar never
     covers the footer / contact form submit button */
  body {
    padding-bottom: 72px;
  }
  #epBackToTop {
    bottom: 84px;
  }
  /* keep the homepage chat widget clear of the sticky CTA bar */
  .chat-widget {
    bottom: 84px !important;
  }
  .chat-box {
    bottom: 154px !important;
  }
}
