html, body {
  overflow-x: clip;
  max-width: 100vw;
}

/**
 * Agency Starter Theme - Main Stylesheet
 */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }

/* Prevent horizontal overflow */
.alignfull { width: 100%; max-width: 100vw; margin-left: 0; margin-right: 0; }
.wp-site-blocks { overflow-x: clip; }

/* Section Spacing */
.as-spacing-sm { padding-top: var(--wp--custom--section--padding-small); padding-bottom: var(--wp--custom--section--padding-small); }
.as-spacing-md { padding-top: var(--wp--custom--section--padding-medium); padding-bottom: var(--wp--custom--section--padding-medium); }
.as-spacing-lg { padding-top: var(--wp--custom--section--padding-large); padding-bottom: var(--wp--custom--section--padding-large); }

/* Card Component */
.as-card { background-color: var(--wp--preset--color--white); border-radius: var(--wp--custom--card--border-radius); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.as-card--bordered { border: 1px solid var(--wp--preset--color--light-medium); }
.as-card--elevated { box-shadow: var(--wp--custom--card--shadow-medium); }
.as-card--elevated:hover { transform: translateY(-4px); box-shadow: var(--wp--custom--card--shadow-large); }

/* Badge Component */
.as-badge { display: inline-flex; align-items: center; gap: 0.375rem; font-size: var(--wp--preset--font-size--small); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.375rem 0.875rem; border-radius: 9999px; background-color: var(--wp--preset--color--secondary); color: var(--wp--preset--color--white); }

/* Checklist for pricing */
.as-checklist { list-style: none; padding-left: 0; margin: var(--wp--preset--spacing--30) 0 var(--wp--preset--spacing--40); }
.as-checklist li { position: relative; padding-left: 1.75rem; margin-bottom: 0.625rem; color: var(--wp--preset--color--dark-medium); }
.as-checklist li::before { content: "✓"; position: absolute; left: 0; font-weight: 800; color: var(--wp--preset--color--accent); }

/* Pricing featured card */
.as-pricing-card--featured { transform: translateY(-8px); }

/* Icon circle */
.as-icon-circle { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--wp--preset--color--light-medium); margin: 0; }

/* Stats */
.as-stat { padding: var(--wp--preset--spacing--20); border-radius: var(--wp--custom--card--border-radius); background: rgba(255,255,255,0.1); }

/* Logo Slider */
.as-overflow-hidden { overflow: hidden !important; }
.as-logo-slider { overflow: hidden; position: relative; }
.as-logo-slider::before, .as-logo-slider::after { content: ""; position: absolute; top: 0; bottom: 0; width: 80px; pointer-events: none; z-index: 2; }
.as-logo-slider::before { left: 0; background: linear-gradient(90deg, var(--wp--preset--color--light) 0%, transparent 100%); }
.as-logo-slider::after { right: 0; background: linear-gradient(270deg, var(--wp--preset--color--light) 0%, transparent 100%); }
.as-logo-slider__track { display: flex; gap: var(--wp--preset--spacing--50); align-items: center; flex-wrap: nowrap; animation: as-marquee 30s linear infinite; width: max-content; }
.as-logo-slider:hover .as-logo-slider__track { animation-play-state: paused; }
.as-logo img { max-height: 48px; width: auto; opacity: 0.7; filter: grayscale(100%); transition: all 0.3s; }
.as-logo:hover img { opacity: 1; filter: grayscale(0); }
@keyframes as-marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Map embed */
.as-map-embed iframe { border-radius: var(--wp--custom--card--border-radius); }

/* Headings inherit text color */
.has-text-color .wp-block-heading:not([class*="-color"]) { color: inherit; }
:where(.wp-site-blocks) :where(.has-text-color) :where(.wp-block-heading:not(.has-text-color)) { color: inherit; }

/* Accessibility */
:focus-visible { outline: 2px solid var(--wp--preset--color--primary); outline-offset: 2px; }
.screen-reader-text { clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }

/* Responsive */
@media (max-width: 782px) {
  .as-logo-slider__track { gap: var(--wp--preset--spacing--30); }
}
/* =========================
   Optional Sticky Header
   ========================= */

html { scroll-padding-top: var(--as-sticky-offset, 0px); }

body.as-has-sticky-header { --as-sticky-offset: 92px; } /* adjust if needed */
@media (max-width: 782px) {
  body.as-has-sticky-header { --as-sticky-offset: 110px; }
}

body.as-has-sticky-header header.wp-block-template-part{
  position: sticky;
  top: 0;
  z-index: 999;
}

/* Admin bar offset */
body.as-has-sticky-header.admin-bar header.wp-block-template-part{ top: 32px; }
@media (max-width: 782px) {
  body.as-has-sticky-header.admin-bar header.wp-block-template-part{ top: 46px; }
}

/* Nice subtle separation */
body.as-has-sticky-header header.wp-block-template-part > .wp-block-group{
  border-bottom: 1px solid var(--wp--preset--color--light-medium);
  box-shadow: 0 6px 18px rgba(0,0,0,.04);
}
