/*
Theme Name:   Astra Child - H&F Construction
Theme URI:    https://hfcinc.ca
Description:  H&F Construction Inc. - WhatsApp contact form
Author:       H&F Construction
Template:     astra
Version:      2.1.0
Text Domain:  astra-child
*/

/* ============================================
   FLOATING WHATSAPP BUTTON
   ============================================ */
.hf-whatsapp-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.hf-whatsapp-btn:hover {
    background: #1ebe57;
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

.hf-whatsapp-btn:focus-visible {
    outline: 3px solid #25D366;
    outline-offset: 3px;
}

.hf-whatsapp-btn svg {
    flex-shrink: 0;
}

.hf-whatsapp-tooltip {
    position: absolute;
    right: 68px;
    top: 50%;
    transform: translateY(-50%);
    background: #1a1a2e;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
}

.hf-whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 6px solid #1a1a2e;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.hf-whatsapp-btn:hover .hf-whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Mobile: position above CTA bar */
@media (max-width: 921px) {
    .hf-whatsapp-btn {
        bottom: 80px;
        right: 16px;
        width: 50px;
        height: 50px;
    }

    .hf-whatsapp-btn svg {
        width: 24px;
        height: 24px;
    }

    .hf-whatsapp-tooltip {
        display: none;
    }
}

/* Small mobile */
@media (max-width: 380px) {
    .hf-whatsapp-btn {
        bottom: 76px;
        right: 12px;
        width: 46px;
        height: 46px;
    }
}

/* ============================================
   HOMEPAGE WHATSAPP CONTACT FORM
   ============================================ */
.hf-wa-form {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    max-width: 900px;
    margin: 0 auto;
}

.hf-wa-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.hf-wa-form-field {
    flex: 1;
    min-width: 0;
}

.hf-wa-form-field-full {
    width: 100%;
    flex: none;
}

.hf-wa-form-field label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: #444444;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.hf-wa-required {
    color: #e74c3c;
    font-weight: 700;
}

.hf-wa-optional {
    font-weight: 400;
    font-size: 0.75rem;
    color: #999999;
}

.hf-wa-form-field input,
.hf-wa-form-field textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #d0d0d0;
    border-radius: 8px;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    color: #333333;
    background: #fafafa;
    transition: border-color 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.hf-wa-form-field input:focus,
.hf-wa-form-field textarea:focus {
    border-color: #e8a838;
    box-shadow: 0 0 0 3px rgba(232, 168, 56, 0.1);
}

.hf-wa-form-field textarea {
    resize: vertical;
    min-height: 100px;
}

.hf-wa-error {
    display: none;
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 4px;
    font-family: 'Open Sans', sans-serif;
}

.hf-wa-form-submit-wrap {
    text-align: center;
    margin-top: 8px;
}

.hf-wa-form-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #25D366;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 16px 36px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
}

.hf-wa-form-btn:hover {
    background: #1ebe57;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

.hf-wa-form-btn:focus-visible {
    outline: 3px solid #25D366;
    outline-offset: 3px;
}

.hf-wa-privacy {
    font-size: 0.8rem;
    color: #999999;
    margin-top: 12px;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 600px) {
    .hf-wa-form {
        padding: 24px 20px;
    }

    .hf-wa-form-row {
        flex-direction: column;
        gap: 0;
    }

    .hf-wa-form-field {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .hf-wa-form-btn {
        width: 100%;
        padding: 14px 24px;
        font-size: 0.95rem;
    }

    .hf-wa-form-field input,
    .hf-wa-form-field textarea {
        font-size: 16px;
    }
}

/* ============================================
   HEADER SITE DESCRIPTION - WHITE TEXT
   ============================================ */
.site-description {
    color: #ffffff !important;
}

/* ============================================
   MOBILE HEADER - FIX LOGO/TEXT OVERLAP
   ============================================ */
@media (max-width: 921px) {
    /* Reduce logo size on mobile - override Astra transparent header rules */
    #ast-mobile-header .site-logo-img img,
    #ast-mobile-header .transparent-custom-logo img,
    .ast-theme-transparent-header #masthead .site-logo-img .transparent-custom-logo img {
        width: 50px !important;
        max-width: 50px !important;
        height: auto !important;
    }

    /* Flex layout for logo + text side by side, vertically centered */
    #ast-mobile-header .site-branding {
        display: flex !important;
        align-items: center !important;
        gap: 10px;
        padding: 6px 0;
        flex-wrap: nowrap;
    }

    /* Smaller description text on mobile so it doesn't crowd the logo */
    #ast-mobile-header .site-description {
        font-size: 0.7rem !important;
        line-height: 1.3 !important;
        margin: 0 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: #ffffff !important;
    }

    /* Ensure enough height for logo + text */
    #ast-mobile-header .ast-primary-header-bar,
    #ast-mobile-header .site-primary-header-wrap {
        min-height: 66px !important;
    }
}

/* Small mobile (320px - 380px) */
@media (max-width: 380px) {
    #ast-mobile-header .site-logo-img img,
    #ast-mobile-header .transparent-custom-logo img,
    .ast-theme-transparent-header #masthead .site-logo-img .transparent-custom-logo img {
        width: 42px !important;
        max-width: 42px !important;
    }

    #ast-mobile-header .site-description {
        font-size: 0.6rem !important;
    }
}

/* ============================================
   HOMEPAGE HANDYMAN COLUMNS — COMPACT SPACING
   ============================================ */
.entry-content .wp-block-columns.is-layout-flex {
    gap: 2em !important;
}
