/*
Theme Name: Ham Investigations
Theme URI: https://haminvestigations.com/
Author: WP API RUNNER
Author URI: https://wpapirunner.com/
Description: Custom, lightweight, Elementor-compatible WordPress theme recreating the Ham Investigations design.
Version: 1.0.2
Text Domain: haminvestigations
*/

@media (min-width: 1024px) { .lg\:sticky { position: sticky; } .lg\:top-32 { top: 8rem; } }

/* Remove empty space around header and hero in Elementor */
html.elementor-html, body.elementor-editor-active { margin-top: 0 !important; padding-top: 0 !important; }
.elementor-location-header { margin-bottom: 0 !important; padding-bottom: 0 !important; }
.site-header { margin-bottom: 0 !important; padding-bottom: 0 !important; }
.site-main, main#primary { margin-top: 0 !important; padding-top: 0 !important; }
.elementor-section { margin-top: 0; }


/* Aggressive gap removal for full-width theme widgets */
.elementor-column:has(.elementor-widget-ham_header), .elementor-column:has(.elementor-widget-ham_page_hero), .elementor-column:has(.elementor-widget-ham_single_post_hero) { padding: 0 !important; }
.elementor-section:has(.elementor-widget-ham_header), .elementor-section:has(.elementor-widget-ham_page_hero), .elementor-section:has(.elementor-widget-ham_single_post_hero) { padding: 0 !important; margin: 0 !important; }
.elementor-widget-wrap:has(.elementor-widget-ham_header), .elementor-widget-wrap:has(.elementor-widget-ham_page_hero), .elementor-widget-wrap:has(.elementor-widget-ham_single_post_hero) { padding: 0 !important; margin: 0 !important; }
.elementor-widget-wrap > .elementor-widget-ham_header, .elementor-widget-wrap > .elementor-widget-ham_page_hero, .elementor-widget-wrap > .elementor-widget-ham_single_post_hero { margin: 0 !important; }


/* Elementor Form Overrides for Ham CTA Widget (Dark Theme) */
.ham-cta-form-container .elementor-form .elementor-field-group .elementor-field {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    padding: 12px 16px !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
}
.ham-cta-form-container .elementor-form .elementor-field-group .elementor-field:focus {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--brand-green, #50B848) !important;
}
.ham-cta-form-container .elementor-form .elementor-field-group .elementor-field::placeholder {
    color: rgba(255, 255, 255, 0.45) !important;
}
.ham-cta-form-container .elementor-form .elementor-button {
    background-color: var(--brand-green, #50B848) !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    padding: 12px 24px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.025em !important;
    transition: filter 0.3s ease !important;
}
.ham-cta-form-container .elementor-form .elementor-button:hover {
    filter: brightness(1.1) !important;
}
.ham-cta-form-container .elementor-form .elementor-field-type-textarea .elementor-field {
    min-height: 120px !important;
}
.ham-cta-form-container .elementor-form .elementor-labels-above label {
    color: #ffffff !important;
    font-size: 14px !important;
}

/* Elementor Form Overrides for Ham Contact Details Form Widget (Light Theme) */
.ham-contact-form-container .elementor-form .elementor-field-group .elementor-field {
    background-color: var(--background, #ffffff) !important;
    border: 1px solid var(--border, #e2e8f0) !important;
    color: var(--foreground, #020817) !important;
    border-radius: 6px !important;
    padding: 12px 16px !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
}
.ham-contact-form-container .elementor-form .elementor-field-group .elementor-field:focus {
    border-color: var(--brand-green, #50B848) !important;
    box-shadow: 0 0 0 2px rgba(80, 184, 72, 0.2) !important;
}
.ham-contact-form-container .elementor-form .elementor-field-group .elementor-field::placeholder {
    color: var(--muted-foreground, #64748b) !important;
}
.ham-contact-form-container .elementor-form .elementor-button {
    background-color: #152238 !important; /* Navy Deep */
    color: #ffffff !important;
    border-radius: 6px !important;
    padding: 16px 36px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    transition: all 0.3s ease !important;
    border: none !important;
}
.ham-contact-form-container .elementor-form .elementor-button:hover {
    background-color: #1F304B !important; 
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1) !important;
}
/* Ensure the icon and text sit perfectly inline */
.ham-contact-form-container .elementor-form .elementor-button .elementor-button-content-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
}
.ham-contact-form-container .elementor-form .elementor-button .elementor-button-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.ham-contact-form-container .elementor-form .elementor-button .elementor-button-icon svg,
.ham-contact-form-container .elementor-form .elementor-button .elementor-button-icon i {
    width: 18px !important;
    height: 18px !important;
    font-size: 18px !important;
}
.ham-contact-form-container .elementor-form .elementor-field-type-textarea .elementor-field {
    min-height: 120px !important;
}
.ham-contact-form-container .elementor-form .elementor-labels-above label {
    color: var(--navy-deep, #152238) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

/* Force remove any extra Elementor margins around header and hero */
.elementor-widget-ham_header,
.elementor-widget-ham_page_hero,
.elementor-widget-ham_single_post_hero {
    margin: 0 !important;
    padding: 0 !important;
}

/* Also target Flexbox Containers */
.e-con:has(.elementor-widget-ham_header),
.e-con:has(.elementor-widget-ham_page_hero),
.e-container:has(.elementor-widget-ham_header),
.e-container:has(.elementor-widget-ham_page_hero) {
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
}

/* Add 30px padding to all sections as requested */
section:not(:has(footer)) {
    padding-top: 30px !important;
    padding-bottom: 30px !important;
}

[data-elementor-type="footer"] section {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Force Name and Email to be 50% side-by-side on desktop */
@media (min-width: 768px) {
    .ham-cta-form-container .elementor-form .elementor-form-fields-wrapper,
    .ham-contact-form-container .elementor-form .elementor-form-fields-wrapper {
        display: flex !important;
        flex-wrap: wrap !important;
        margin-left: -8px !important;
        margin-right: -8px !important;
    }
    
    .ham-cta-form-container .elementor-form .elementor-field-group,
    .ham-contact-form-container .elementor-form .elementor-field-group {
        width: 100% !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        box-sizing: border-box !important;
    }

    .ham-cta-form-container .elementor-form .elementor-field-group:nth-child(1),
    .ham-cta-form-container .elementor-form .elementor-field-group:nth-child(2),
    .ham-contact-form-container .elementor-form .elementor-field-group:nth-child(1),
    .ham-contact-form-container .elementor-form .elementor-field-group:nth-child(2) {
        width: 50% !important;
    }
    
    /* Ensure the submit button aligns left */
    .ham-cta-form-container .elementor-form .elementor-field-group.elementor-button-wrapper,
    .ham-contact-form-container .elementor-form .elementor-field-group.elementor-button-wrapper {
        text-align: left !important;
        width: 100% !important;
    }
}

/* Fix the CTA Form button vertical stacking issue */
.ham-cta-form-container .elementor-form .elementor-button .elementor-button-content-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    flex-direction: row !important;
}
.ham-cta-form-container .elementor-form .elementor-button .elementor-button-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.ham-cta-form-container .elementor-form .elementor-button .elementor-button-icon svg,
.ham-cta-form-container .elementor-form .elementor-button .elementor-button-icon i {
    width: 18px !important;
    height: 18px !important;
    font-size: 18px !important;
}

/* Force Full Width on Header and Hero wrappers */
.elementor-container:has(.elementor-widget-ham_header), 
.elementor-container:has(.elementor-widget-ham_page_hero), 
.elementor-container:has(.elementor-widget-ham_single_post_hero),
.e-con:has(.elementor-widget-ham_header), 
.e-con:has(.elementor-widget-ham_page_hero),
.e-con-inner:has(.elementor-widget-ham_header), 
.e-con-inner:has(.elementor-widget-ham_page_hero) {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Add vertical spacing between form rows */
.ham-cta-form-container .elementor-form .elementor-field-group,
.ham-contact-form-container .elementor-form .elementor-field-group {
    margin-bottom: 16px !important;
}

/* Force Full Width on Header and Hero wrappers */
.elementor-container:has(.elementor-widget-ham_header), 
.elementor-container:has(.elementor-widget-ham_page_hero), 
.elementor-container:has(.elementor-widget-ham_single_post_hero),
.e-con:has(.elementor-widget-ham_header), 
.e-con:has(.elementor-widget-ham_page_hero),
.e-con:has(.elementor-widget-ham_single_post_hero),
.e-con-inner:has(.elementor-widget-ham_header), 
.e-con-inner:has(.elementor-widget-ham_page_hero),
.e-con-inner:has(.elementor-widget-ham_single_post_hero) {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}