/* ============================================================
   CC GROWTH THEME — Elementor Overrides
   Loaded after elementor-frontend.css to ensure theme tokens
   take precedence over Elementor's default values.
   ============================================================ */

/* ── SCROLL BEHAVIOR OVERRIDE ────────────────────────────────────────────────
   Elementor's frontend.css injects:
     @media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
   This fires on virtually every real browser (incognito included) and causes the
   page to animate-scroll to any URL hash fragment on load, landing visitors on
   the "Get Started Today" CTA section instead of the hero.
   This rule loads after Elementor's CSS (#5 vs #4 in <head>) so it wins the
   cascade. !important ensures the media-query wrapper cannot outrank it.
────────────────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: auto !important;
  }
}
html {
  scroll-behavior: auto !important;
}

/* ── GLOBAL RESET RECOVERY ──────────────────────────────────────────────────
   The theme's app.css applies * { margin:0; padding:0 } globally.
   Elementor relies on its own internal spacing for sections, columns, and
   widgets — restore those defaults here so layout is not broken.
   ─────────────────────────────────────────────────────────────────────────── */

/* Section / Container padding */
.elementor-section,
.elementor-container,
.e-container,
.e-con {
    padding-left:  revert;
    padding-right: revert;
}

/* Column gap and padding */
.elementor-column-gap-default > .elementor-row > .elementor-column > .elementor-column-wrap,
.elementor-column > .elementor-column-wrap > .elementor-widget-wrap {
    padding: revert;
}

/* Widget margin */
.elementor-widget-wrap > .elementor-widget {
    margin-bottom: revert;
}

/* Image margin revert (the global * reset removes browser default img bottom spacing) */
.elementor-widget-image img,
.elementor-widget-image-box img {
    margin: revert;
}

/* List items inside Elementor widgets (bullet lists, icon lists) */
.elementor-widget ul,
.elementor-widget ol,
.elementor-widget li {
    margin:  revert;
    padding: revert;
    list-style: revert;
}

/* Elementor icon list spacing */
.elementor-icon-list-items,
.elementor-icon-list-item {
    padding: revert;
    margin:  revert;
}

/* Elementor accordion/tab heading margins */
.elementor-accordion-title,
.elementor-tab-title,
.elementor-tab-content p {
    margin: revert;
}

/* Ensure Elementor's own widget spacing system works */
.elementor-widget-container {
    /* The global reset strips all implicit margin; let Elementor control this */
    margin: 0;  /* Elementor sets this deliberately */
}

/* Map Elementor color variables to theme tokens */
.e-global-color { /* Handled via color-sync.php */ }

/* Override Elementor button defaults */
.elementor-button {
    font-family: var(--ccg-font-heading) !important;
    font-weight: var(--ccg-weight-semibold) !important;
    border-radius: var(--ccg-radius-md) !important;
    transition: background-color var(--ccg-transition-base), transform var(--ccg-transition-fast) !important;
}

.elementor-button:hover {
    transform: translateY(-1px);
}

/* Elementor heading consistency */
.elementor-heading-title {
    font-family: var(--ccg-font-heading) !important;
    line-height: var(--ccg-leading-tight) !important;
}

/* Elementor form elements */
.elementor-field-group .elementor-field {
    border-radius: var(--ccg-radius-md) !important;
    font-family: var(--ccg-font-body) !important;
    border-color: var(--ccg-color-mid-gray) !important;
    transition: border-color var(--ccg-transition-base) !important;
}

.elementor-field-group .elementor-field:focus {
    border-color: var(--ccg-color-primary) !important;
    box-shadow: 0 0 0 3px rgba(26,60,110,0.12) !important;
    outline: none !important;
}

/* Elementor section padding consistency */
.elementor-section.elementor-section-boxed > .elementor-container {
    max-width: var(--ccg-container-xl) !important;
}

/* Remove Elementor's own sticky header z-index conflict */
.elementor-sticky--active { z-index: var(--ccg-z-sticky) !important; }

/* Elementor divider */
.elementor-divider-separator {
    border-color: var(--ccg-color-light-gray) !important;
}

/* Theme Builder header/footer resets */
body:not(.elementor-editor-active) .ccg-header + .elementor-location-header {
    position: sticky;
    top: 0;
    z-index: var(--ccg-z-sticky);
}

/* Popup overlay */
.elementor-popup-modal .dialog-widget-content {
    border-radius: var(--ccg-radius-2xl) !important;
    overflow: hidden !important;
}
