/*
 * Elementor Compatibility Styles
 * 
 * @package Agency_Edit
 */

/* Full Width Template */
.full-width {
    width: 100%;
    max-width: 100%;
}

/* Canvas Template */
.page-canvas {
    margin: 0;
    padding: 0;
}

.page-canvas #page {
    padding: 0;
}

/* Elementor Container Support */
.elementor-section.elementor-section-boxed>.elementor-container {
    max-width: 1200px;
}

/* Remove default theme spacing for Elementor pages */
.elementor-default .site-container {
    padding: 0;
}

.elementor-default .content-area {
    margin: 0;
}

/* Ensure Elementor sections are full width */
.elementor-section-stretched {
    width: 100vw !important;
    left: 50% !important;
    margin-left: -50vw !important;
}

/* Fix for Elementor editor */
.elementor-editor-active .site-header,
.elementor-editor-active .site-footer {
    position: relative !important;
}

/* Fix header overlap in Elementor editor */
.elementor-editor-active .navbar {
    position: relative !important;
}

/* Add padding to prevent content from being cut off by fixed header */
.elementor-editor-active #page {
    padding-top: 0 !important;
}

/* Elementor widgets inherit theme typography by default */
.elementor-widget-text-editor {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* Ensure Elementor buttons look good */
.elementor-button {
    display: inline-block;
    line-height: 1;
    background-color: #0073aa;
    font-size: 15px;
    padding: 12px 24px;
    border-radius: 3px;
    color: #fff;
    fill: #fff;
    text-align: center;
    transition: all .3s;
}

.elementor-button:hover {
    background-color: #005177;
    color: #fff;
}

/* Fix header/footer when using Elementor Theme Builder */
.elementor-location-header {
    position: relative;
    z-index: 9999;
}

.elementor-location-footer {
    margin-top: 0;
}

/* When Elementor header is active, hide default theme header */
body.elementor-template-full-width .site-header,
body.elementor-template-canvas .site-header {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .elementor-section-stretched {
        width: 100vw !important;
        left: 50% !important;
        margin-left: -50vw !important;
    }
}

/* Print styles */
@media print {
    .elementor-section-stretched {
        width: 100% !important;
        left: 0 !important;
        margin-left: 0 !important;
    }
}

/* ===========================
   Elementor Global Styles Integration
   =========================== */

/* Ensure Elementor buttons use global primary color */
.elementor-button {
    background-color: var(--e-global-color-primary, #0073aa);
}

.elementor-button:hover {
    background-color: var(--e-global-color-accent, #005177);
}

/* Ensure Elementor headings inherit global typography */
.elementor-widget-heading .elementor-heading-title {
    font-family: var(--e-global-typography-primary-font-family);
    font-weight: var(--e-global-typography-primary-font-weight);
    line-height: var(--e-global-typography-primary-line-height);
    letter-spacing: var(--e-global-typography-primary-letter-spacing);
}

/* Ensure Elementor text widgets inherit body typography */
.elementor-widget-text-editor {
    font-family: var(--e-global-typography-secondary-font-family);
    font-size: var(--e-global-typography-secondary-font-size);
    line-height: var(--e-global-typography-secondary-line-height);
}

/* Link colors in Elementor content */
.elementor-widget-text-editor a {
    color: var(--e-global-color-primary);
    transition: all 0.3s ease;
}

.elementor-widget-text-editor a:hover {
    color: var(--e-global-color-accent);
}