/*
Theme Name:        EHWR Child Theme
Theme URI:         https://emergencyhotwaterrepairs.com.au
Description:       Custom child theme for Emergency Hot Water Repairs. Built on Hello Elementor for maximum Elementor compatibility and clean mobile rendering.
Author:            Emergency Hot Water Repairs
Author URI:        https://emergencyhotwaterrepairs.com.au
Template:          accelerate-pro
Version:           1.6.0
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       ehwr-child
*/

/* =============================================
   RESET & BASE
   ============================================= */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333333;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #e8261a;
    text-decoration: none;
}

a:hover {
    color: #b51c12;
    text-decoration: underline;
}

/* =============================================
   BRAND COLOURS
   ============================================= */

:root {
    --ehwr-red:        #e8261a;
    --ehwr-red-dark:   #b51c12;
    --ehwr-navy:       #1a2744;
    --ehwr-navy-light: #243460;
    --ehwr-grey:       #f5f5f5;
    --ehwr-border:     #dddddd;
    --ehwr-text:       #333333;
    --ehwr-text-light: #666666;
    --ehwr-white:      #ffffff;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Open Sans', Arial, sans-serif;
    font-weight: 700;
    line-height: 1.25;
    color: var(--ehwr-navy);
    margin-top: 0;
    margin-bottom: 0.75em;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p {
    margin-top: 0;
    margin-bottom: 1em;
}

/* =============================================
   LAYOUT
   ============================================= */

.site-wrapper,
.page-wrapper {
    width: 100%;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
}

/* =============================================
   HEADER — fallback only (Elementor overrides)
   ============================================= */

.site-header {
    background-color: var(--ehwr-navy);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.site-header .site-logo img {
    max-height: 60px;
    width: auto;
}

/* =============================================
   NAV — conflict fix for old-template pages
   showing duplicate menus
   ============================================= */

/* Prevent Hello Elementor native nav from showing
   when Elementor header canvas is active */
.elementor-page .site-header,
.elementor-page .site-navigation,
.elementor-template-full-width .site-header,
.elementor-template-full-width .site-navigation {
    display: none !important;
}

/* Ensure only ONE nav renders on non-Elementor pages */
.site-navigation {
    background-color: var(--ehwr-navy);
}

.site-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.site-navigation ul li a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--ehwr-white);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-decoration: none;
    transition: background 0.2s;
}

.site-navigation ul li a:hover {
    background-color: var(--ehwr-red);
    color: var(--ehwr-white);
    text-decoration: none;
}

/* Mobile nav */
@media (max-width: 767px) {
    .site-navigation ul {
        flex-direction: column;
    }
    .site-navigation ul li a {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
}

/* =============================================
   FOOTER — fallback only (Elementor overrides)
   ============================================= */

.site-footer {
    background-color: var(--ehwr-navy);
    color: rgba(255,255,255,0.75);
    font-size: 0.875rem;
    padding: 2rem 1rem;
    text-align: center;
}

.site-footer a {
    color: rgba(255,255,255,0.85);
}

.site-footer a:hover {
    color: var(--ehwr-white);
}

/* =============================================
   BUTTONS
   ============================================= */

.btn,
.wp-block-button__link,
button[type="submit"] {
    display: inline-block;
    background-color: var(--ehwr-red);
    color: var(--ehwr-white) !important;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.8rem 1.75rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.2s, transform 0.1s;
    text-align: center;
    line-height: 1.3;
}

.btn:hover,
.wp-block-button__link:hover,
button[type="submit"]:hover {
    background-color: var(--ehwr-red-dark);
    transform: translateY(-1px);
}

.btn-navy {
    background-color: var(--ehwr-navy);
}

.btn-navy:hover {
    background-color: var(--ehwr-navy-light);
}

/* =============================================
   FORMS
   ============================================= */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--ehwr-border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--ehwr-text);
    background-color: var(--ehwr-white);
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--ehwr-red);
    box-shadow: 0 0 0 2px rgba(232, 38, 26, 0.15);
}

/* =============================================
   MOBILE — global fixes
   ============================================= */

@media (max-width: 767px) {
    /* Prevent horizontal scroll */
    .site-wrapper,
    .page-wrapper {
        overflow-x: hidden;
        max-width: 100vw;
    }

    /* Fix Elementor columns stacking */
    .elementor-column {
        width: 100% !important;
    }

    /* Tighten section padding on mobile */
    .elementor-section {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Fix oversized text widgets */
    .elementor-widget-text-editor,
    .elementor-widget-heading {
        word-break: break-word;
    }

    /* Fix tables overflowing */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }

    .btn {
        width: 100%;
        display: block;
        text-align: center;
    }
}

/* =============================================
   ACCELERATE PRO — conflict fixes
   ============================================= */

/* Remove Accelerate Pro's sidebar layout pushing content right */
#page,
#content,
#primary,
.site-content,
.content-area,
.hentry {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove Accelerate Pro's sidebar */
#secondary,
.widget-area,
.sidebar {
    display: none !important;
}

/* Fix Accelerate Pro container max-width interfering */
.site-content .wrap,
#content .wrap,
.wrap {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Remove any Accelerate Pro body padding/margin */
body.wp-child-theme-ehwr-theme {
    padding: 0 !important;
    margin: 0 !important;
}

/* Ensure html element never blocks scroll */
html {
    overflow-x: hidden !important;
}

/* Fix Accelerate Pro's #page wrapper */
#page.hfeed {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* =============================================
   ELEMENTOR OVERRIDES — compatibility
   ============================================= */

/* Remove Hello Elementor's default body padding */
.elementor-page body {
    padding: 0 !important;
}

/* Ensure full-width sections work correctly */
.elementor-section.elementor-section-stretched {
    width: 100vw !important;
    max-width: 100vw !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

/* Fix for Elementor popup z-index conflicts */
.elementor-popup-modal {
    z-index: 9999 !important;
}

/* Fix gap between header and Elementor page content */
.elementor-page .site-content,
.elementor-page #content,
.elementor-page .content-area,
.elementor-page #primary,
.elementor-page .hentry,
.elementor-page article,
.elementor-page .entry-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove Accelerate Pro's default content top padding */
.site-content {
    padding-top: 0 !important;
}

#content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}



.suburb-hero {
    background-color: var(--ehwr-navy);
    color: var(--ehwr-white);
    padding: 3rem 1rem;
    text-align: center;
}

.suburb-hero h1 {
    color: var(--ehwr-white);
    margin-bottom: 0.5rem;
}

.suburb-hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    max-width: 640px;
    margin: 0 auto 1.5rem;
}

/* =============================================
   TRUSTINDEX WIDGET
   ============================================= */

.trustindex-widget {
    max-width: 100%;
    overflow: hidden;
}

/* =============================================
   UTILITY CLASSES
   ============================================= */

.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }
.text-red     { color: var(--ehwr-red); }
.text-navy    { color: var(--ehwr-navy); }
.text-muted   { color: var(--ehwr-text-light); }
.bg-grey      { background-color: var(--ehwr-grey); }
.bg-navy      { background-color: var(--ehwr-navy); }
.bg-red       { background-color: var(--ehwr-red); }
.mt-0  { margin-top: 0; }
.mb-0  { margin-bottom: 0; }
.mt-1  { margin-top: 1rem; }
.mb-1  { margin-bottom: 1rem; }
.mt-2  { margin-top: 2rem; }
.mb-2  { margin-bottom: 2rem; }
.hidden       { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
