/* A.C.E Tennis — global site styles & mobile responsive sweep
   Loaded by every page after colors_and_type.css */

html, body {
  margin: 0;
  padding: 0;
  background: #14181F;       /* match footer navy across the whole site */
  color: #fff;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;        /* never allow horizontal scroll */
  scroll-behavior: smooth;
}
* { box-sizing: border-box; }
img, svg { max-width: 100%; height: auto; }

button:focus-visible, a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(180,250,30,0.45);
}
a { transition: opacity 150ms cubic-bezier(.2,.8,.2,1); }
a, a * { text-decoration: none; }
a:hover { opacity: 0.78; }
button { transition: background 150ms cubic-bezier(.2,.8,.2,1), transform 120ms; cursor: pointer; }
button:active { transform: translateY(1px); }

@keyframes kenBurns {
  0%   { transform: scale(1.06) translate(0, 0); }
  100% { transform: scale(1.14) translate(-2%, -1.5%); }
}
@keyframes marqueeLeft {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes ballPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(180,250,30,0.55); }
  50%      { box-shadow: 0 0 0 6px rgba(180,250,30,0); }
}

/* =====================================================
   Mobile responsive sweep — stacks all multi-col grids,
   scales headings down, ensures comfy edge padding.
   ===================================================== */
@media (max-width: 820px) {
  /* Generic — any direct grid we use should collapse to single column on mobile */
  .ace-grid-2, .ace-grid-3, .ace-grid-4, .ace-grid-5,
  [data-ace-grid="2"], [data-ace-grid="3"], [data-ace-grid="4"], [data-ace-grid="5"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  /* Programs / Tours / About sections — collapse 2-col layouts */
  [data-ace-stack="true"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  /* Sticky left pathway nav becomes a horizontal scrollable strip on mobile */
  [data-ace-pathway-grid="true"] {
    display: block !important;
  }
  [data-ace-pathway-nav="true"] {
    position: relative !important;
    top: 0 !important;
    padding-top: 24px !important;
    padding-bottom: 16px !important;
    overflow-x: auto;
    white-space: nowrap;
  }
  [data-ace-pathway-nav="true"] ul {
    display: flex !important;
    flex-direction: row !important;
    gap: 18px !important;
  }
}

@media (max-width: 640px) {
  /* Container padding — keep stuff off the edges */
  [data-ace-container="true"] { padding-left: 20px !important; padding-right: 20px !important; }

  /* Headline scale-downs */
  h1[data-ace-h1] { font-size: clamp(36px, 10vw, 56px) !important; }
  h2[data-ace-h2] { font-size: clamp(28px, 7.5vw, 40px) !important; }

  /* Footer logos sit nicely side-by-side on small screens */
  [data-ace-footer-logos] { gap: 14px !important; }
  [data-ace-footer-logos] img { height: 56px !important; }
  [data-ace-footer-logos] img.small { height: 40px !important; }

  /* Hero CTAs and scroll cue overlap on phones — re-stack */
  [data-ace-hero-ctas="true"] {
    position: static !important;
    align-items: stretch !important;
    width: 100% !important;
    padding: 0 20px 80px !important;
    margin-top: 40px !important;
  }

  /* Hero headline ease */
  [data-ace-hero-h1] {
    align-items: flex-start !important;
  }

  /* Header — keep brand + cta visible; hide social on tight widths */
  [data-ace-hide-on-mobile="true"] { display: none !important; }

  /* Header nav links collapse to a single line, smaller */
  [data-ace-header-nav] {
    gap: 14px !important;
  }
}
