/* =====================================================
   OneAgentCo — UX/UI Enhancements
   Injected on top of existing Astro-generated CSS.
   Do NOT edit the base /_astro/*.css files.
   ===================================================== */

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Better typography */
body {
  letter-spacing: -0.01em;
}
h1, h2, h3 {
  letter-spacing: -0.02em;
}

/* ── Hero animated gradient background ── */
.hero-gradient-animated {
  background: linear-gradient(135deg,
    rgba(59,130,246,0.12) 0%,
    rgba(139,92,246,0.12) 50%,
    rgba(59,130,246,0.08) 100%);
  background-size: 200% 200%;
  animation: heroShift 8s ease infinite alternate;
}
@keyframes heroShift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* ── CTA button glow on hover ── */
.gradient-btn {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.gradient-btn:hover {
  box-shadow: 0 0 30px rgba(59,130,246,0.45);
  transform: translateY(-2px);
}

/* ── Service / feature cards ── */
.card-hover {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #1f1f1f;
}
.card-hover:hover {
  transform: translateY(-8px);
  border-color: rgba(139,92,246,0.45);
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
}

/* ── Pricing cards ── */
.pricing-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pricing-card:hover {
  transform: scale(1.03);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}
.pricing-recommended {
  border: 2px solid #8b5cf6 !important;
  position: relative;
}

/* ── FAQ accordion ── */
details summary {
  cursor: pointer;
}
details summary::marker,
details summary::-webkit-details-marker {
  display: none;
}

/* ── Scroll-reveal animations ── */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Form focus enhancement ── */
input:focus,
textarea:focus,
select:focus {
  outline: none !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.2) !important;
}

/* ── Mobile menu ── */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  color: #9ca3af;
  font-size: 1.2rem;
  line-height: 1;
}
@media (max-width: 640px) {
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .nav-links-mobile {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10,10,10,0.97);
    border-bottom: 1px solid #1f1f1f;
    padding: 1rem 1.5rem;
    flex-direction: column;
    gap: 1rem;
  }
  .nav-links-mobile.open {
    display: flex;
  }
}

/* ── Section vertical rhythm ── */
main > section {
  /* already has py-24 from Tailwind; add subtle scroll margin for sticky header */
  scroll-margin-top: 72px;
}

/* ── Stat bar pulse on load ── */
@keyframes statFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stat-bar > div {
  animation: statFadeIn 0.6s ease both;
}
.stat-bar > div:nth-child(1) { animation-delay: 0.1s; }
.stat-bar > div:nth-child(2) { animation-delay: 0.25s; }
.stat-bar > div:nth-child(3) { animation-delay: 0.4s; }

/* ── Table row hover (already has Tailwind, reinforce) ── */
tbody tr {
  transition: background-color 0.2s ease;
}

/* ── Footer link underline on hover ── */
footer a {
  transition: color 0.2s ease;
  text-underline-offset: 3px;
}
footer a:hover {
  text-decoration: underline;
}

/* Fix pricing mobile */
#pricing .pricing-grid,
#pricing [style*="grid-template-columns"] {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1.5rem !important;
}
@media (min-width: 768px) {
  #pricing .pricing-grid,
  #pricing [style*="grid-template-columns"] {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Fix how-it-works mobile */
@media (max-width: 640px) {
  #how-it-works ol > li {
    flex-direction: column !important;
    gap: 1rem !important;
  }
  #how-it-works ol > li > div:first-child {
    width: 3rem !important;
    height: 3rem !important;
    flex-shrink: 0 !important;
  }
}

/* Fix horizontal overflow on mobile */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

/* Tables responsive on mobile */
@media (max-width: 768px) {
  table {
    min-width: unset !important;
    width: 100% !important;
    font-size: 0.75rem !important;
  }
  table th, table td {
    padding: 0.5rem 0.4rem !important;
    word-break: break-word !important;
  }
  /* Hide less important columns on very small screens */
  .overflow-x-auto {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100vw !important;
  }
}

/* Ensure no element breaks out of viewport */
*, *::before, *::after {
  max-width: 100vw;
}
img, video, iframe, table, pre, code {
  max-width: 100% !important;
}

/* Fix the inserted sections inline tables */
@media (max-width: 640px) {
  [style*="min-width:600px"],
  [style*="min-width: 600px"] {
    min-width: unset !important;
    width: 100% !important;
  }
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns:1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-template-columns:2fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* === MOBILE HORIZONTAL SCROLL FIX === */
html {
  overflow-x: hidden;
}
body {
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

/* Force all grids to single column on small screens */
@media (max-width: 640px) {
  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Tables scroll within container, not page */
  .overflow-x-auto {
    max-width: calc(100vw - 2rem) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  table {
    font-size: 0.7rem !important;
  }
  table th, table td {
    padding: 0.4rem !important;
    word-break: break-word !important;
  }
  
  /* Prevent any element from exceeding viewport */
  section, div, article, aside, main, header, footer, nav {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
  
  /* Fix hero overflow-hidden that might cause issues */
  .overflow-hidden {
    overflow: hidden !important;
  }
}

@media (max-width: 768px) {
  [style*="grid-template-columns"]:not([style*="1fr)"]) {
    grid-template-columns: 1fr !important;
  }
}

/* ROI Cards responsive */
.roi-cards > div:nth-child(2) {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 640px) {
  .roi-cards > div:nth-child(2) {
    grid-template-columns: 1fr !important;
  }
}

/* Contact Tabs — Personal / Business */
.contact-tabs {
  display: flex;
  background: rgba(255,255,255,0.05);
  border-radius: 0.75rem;
  padding: 0.25rem;
  margin-bottom: 2rem;
}
.contact-tab {
  flex: 1;
  padding: 0.75rem 1rem;
  text-align: center;
  border-radius: 0.625rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  background: transparent;
  color: #6b7280;
}
.contact-tab.active {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}
.contact-form-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}
.contact-form-panel.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
