/**
 * Elementor Specific Centering Fixes
 * King Size Game - Elementor Layout Corrections
 * Version: 1.0.0
 */

/* ==========================================================================
   ELEMENTOR GLOBAL FIXES
   ========================================================================== */

/* Reset Elementor default margins that can cause misalignment */
.elementor {
  margin: 0;
  width: 100%;
}

.elementor *,
.elementor *:before,
.elementor *:after {
  box-sizing: border-box;
}

/* Fix Elementor sections */
.elementor-section {
  width: 100%;
  margin: 0 auto;
  position: relative;
}

/* Ensure inner content is centered */
.elementor-section > .elementor-container {
  margin: 0 auto;
  position: relative;
}

/* ==========================================================================
   BOXED CONTENT CENTERING
   ========================================================================== */

/* Standard boxed layout */
.elementor-section.elementor-section-boxed > .elementor-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Narrow boxed layout */
.elementor-section.elementor-section-boxed.elementor-section-narrow > .elementor-container {
  max-width: 1200px;
}

/* Extra narrow boxed layout */
.elementor-section.elementor-section-boxed.elementor-section-narrow-extra > .elementor-container {
  max-width: 960px;
}

/* ==========================================================================
   FULL WIDTH SECTIONS WITH CENTERED CONTENT
   ========================================================================== */

.elementor-section.elementor-section-full_width {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.elementor-section.elementor-section-full_width > .elementor-container {
  max-width: 100%;
  width: 100%;
  padding-left: 24px;
  padding-right: 24px;
}

/* Centered content within full width sections */
.elementor-section.elementor-section-full_width .elementor-widget-container {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   STRETCHED SECTIONS
   ========================================================================== */

.elementor-section-stretched {
  width: 100vw !important;
  left: 50% !important;
  right: 50% !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  position: relative;
  max-width: 100vw !important;
}

.elementor-section-stretched > .elementor-container {
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ==========================================================================
   COLUMN CENTERING
   ========================================================================== */

/* Center single columns */
.elementor-column-wrap,
.elementor-widget-wrap {
  width: 100%;
  margin: 0 auto;
}

/* Center column content */
.elementor-column > .elementor-column-wrap > .elementor-widget-wrap,
.elementor-column > .elementor-widget-wrap {
  margin: 0 auto;
  width: 100%;
}

/* Single column sections */
.elementor-section .elementor-container > .elementor-row > .elementor-column:only-child,
.elementor-section .elementor-container > .elementor-column:only-child {
  width: 100%;
  max-width: 100%;
}

/* ==========================================================================
   WIDGET SPECIFIC CENTERING
   ========================================================================== */

/* Text widgets */
.elementor-widget-text-editor .elementor-widget-container,
.elementor-widget-heading .elementor-widget-container {
  margin-left: auto;
  margin-right: auto;
}

/* Center aligned text widgets */
.elementor-widget.elementor-align-center .elementor-widget-container {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Image widgets */
.elementor-widget-image {
  text-align: center;
}

.elementor-widget-image img {
  margin-left: auto;
  margin-right: auto;
  display: block;
  max-width: 100%;
  height: auto;
}

/* Button widgets */
.elementor-widget-button {
  text-align: center;
}

.elementor-widget-button .elementor-button-wrapper {
  display: inline-block;
  margin: 0 auto;
}

/* Form widgets */
.elementor-widget-form .elementor-form {
  max-width: 768px;
  margin: 0 auto;
}

/* ==========================================================================
   CUSTOM KINGSIZE WIDGETS CENTERING
   ========================================================================== */

/* Hero Banner */
.elementor-widget-kingsize_hero_banner .hero-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding: 0 24px;
}

/* FAQ Accordion */
.elementor-widget-kingsize_faq_accordion .faq-container {
  max-width: 960px;
  margin: 0 auto;
}

/* Testimonials */
.elementor-widget-kingsize_testimonials .testimonials-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* How It Works */
.elementor-widget-kingsize_how_it_works .steps-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Events Grid */
.elementor-widget-kingsize_events_grid .events-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Gallery */
.elementor-widget-kingsize_gallery_holographic .gallery-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Cyberpunk Map */
.elementor-widget-kingsize_cyberpunk_map .map-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ==========================================================================
   RESPONSIVE CENTERING FIXES
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
  .elementor-section.elementor-section-boxed > .elementor-container {
    max-width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }

  .elementor-section-stretched > .elementor-container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .elementor-widget-container {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .elementor-section.elementor-section-boxed > .elementor-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .elementor-section-stretched > .elementor-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .elementor-section.elementor-section-full_width > .elementor-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Stack columns on mobile */
  .elementor-column {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Center mobile columns */
  .elementor-column > .elementor-column-wrap,
  .elementor-column > .elementor-widget-wrap {
    margin: 0 auto;
    padding: 0;
  }

  /* Reset widget margins on mobile */
  .elementor-widget:not(:last-child) {
    margin-bottom: 20px;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .elementor-section.elementor-section-boxed > .elementor-container,
  .elementor-section-stretched > .elementor-container,
  .elementor-section.elementor-section-full_width > .elementor-container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero-content,
  .faq-container,
  .testimonials-container,
  .steps-container,
  .events-container,
  .gallery-container,
  .map-container {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* ==========================================================================
   FIXES FOR COMMON ELEMENTOR ISSUES
   ========================================================================== */

/* Fix horizontal scroll issues */
.elementor-top-section {
  overflow: hidden;
}

/* Prevent content from touching edges */
.elementor-text-editor p,
.elementor-heading-title {
  padding-left: 10px;
  padding-right: 10px;
}

/* Fix gap issues in columns */
.elementor-column-gap-no > .elementor-column > .elementor-element-populated {
  padding: 0;
}

.elementor-column-gap-narrow > .elementor-column > .elementor-element-populated {
  padding: 5px;
}

.elementor-column-gap-default > .elementor-column > .elementor-element-populated {
  padding: 10px;
}

.elementor-column-gap-extended > .elementor-column > .elementor-element-populated {
  padding: 15px;
}

.elementor-column-gap-wide > .elementor-column > .elementor-element-populated {
  padding: 20px;
}

.elementor-column-gap-wider > .elementor-column > .elementor-element-populated {
  padding: 30px;
}

/* Fix inner sections */
.elementor-inner-section {
  width: 100%;
  margin: 0 auto;
}

.elementor-inner-section > .elementor-container {
  max-width: 100%;
  margin: 0 auto;
}

/* ==========================================================================
   OVERRIDE INLINE STYLES (Use with caution)
   ========================================================================== */

/* Force center important elements */
.force-center {
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

.force-center-container {
  max-width: 1400px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
}

/* ==========================================================================
   DEBUG HELPERS (Remove in production)
   ========================================================================== */

/* Uncomment to visualize element boundaries during development
.elementor-section {
  border: 2px solid rgba(255, 0, 0, 0.2);
}

.elementor-container {
  border: 2px solid rgba(0, 255, 0, 0.2);
}

.elementor-column {
  border: 2px solid rgba(0, 0, 255, 0.2);
}

.elementor-widget {
  border: 2px solid rgba(255, 255, 0, 0.2);
}
*/