/* Roof2Root – Disable clicks on service photographs */

.service-card-img {
    pointer-events: none !important;
    cursor: default !important;
}

/* Roof2Root – Full-screen photograph popup */

#roof2root-lightbox {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    background: rgba(0, 0, 0, 0.90) !important;
    z-index: 2147483647 !important;
    align-items: center !important;
    justify-content: center !important;
}

#roof2root-lightbox.is-open {
    display: flex !important;
}

#roof2root-lightbox img {
    display: block !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    max-width: 95vw !important;
    max-height: 90vh !important;
    object-fit: contain !important;
    margin: auto !important;
    transform: none !important;
    border-radius: 6px !important;
}

#roof2root-lightbox .r2r-close {
    position: absolute !important;
    top: 15px !important;
    right: 25px !important;
    z-index: 2 !important;
    color: #ffffff !important;
    background: transparent !important;
    border: none !important;
    font-size: 42px !important;
    cursor: pointer !important;
}

.service-card-img:has(img) {
    pointer-events: auto !important;
    cursor: zoom-in !important;
}

/* Roof2Root – Hero description visibility */

.hero-sub {
    color: #FFFFFF !important;
    font-weight: 600 !important;
    -webkit-text-stroke: 0.3px rgba(0, 0, 0, 0.55);
    text-shadow:
        1px 1px 3px rgba(0, 0, 0, 0.85),
        0 2px 6px rgba(0, 0, 0, 0.65);
}

/* Roof2Root – Improve website text readability */

:root {
    --muted: #414A45;
}

.section-sub,
.service-card p,
.about-content p,
.why-card p,
.step-card p,
.testimonial-card blockquote,
.entry-content p,
.faq-answer {
    font-weight: 500;
}

/* Roof2Root – Why Choose Us card styling */

.why-card {
    background: #F7F5F0 !important;
    border: 1px solid #DDD8CC !important;
    box-shadow: 0 5px 18px rgba(31, 42, 36, 0.14) !important;
}

.why-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(31, 42, 36, 0.22) !important;
}

/* Roof2Root — Services dropdown menu */

.main-navigation .menu-item-has-children {
    position: relative;
}

.main-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    padding: 8px 0;
    margin: 0;
    list-style: none;
    background: #FFFFFF;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    z-index: 9999;
}

.main-navigation .menu-item-has-children:hover > .sub-menu,
.main-navigation .menu-item-has-children:focus-within > .sub-menu {
    display: block;
}

.main-navigation .sub-menu li {
    display: block;
    width: 100%;
    margin: 0;
}

.main-navigation .sub-menu a {
    display: block;
    padding: 12px 18px;
    white-space: normal;
    color: #203F27;
    text-decoration: none;
}

.main-navigation .sub-menu a:hover,
.main-navigation .sub-menu a:focus {
    background: #F3F0E7;
}

/* Make the four Services sections wider */
body.page .entry-content > .wp-block-media-text {
    width: 110%;
    max-width: 1200px;
    margin-left: 50%;
    transform: translateX(-50%);
}

/* ========== ROOF2ROOT CONTACT PAGE ========== */

/* Widen the Contact page content to 95% */
body:has(.page-hero.contact-banner) .content-area > .container {
    width: 95% !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Remove the theme's narrow content restriction */
body:has(.page-hero.contact-banner) .entry-content {
    width: 100% !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Widen the ivory two-column section */
body:has(.page-hero.contact-banner) .entry-content .wp-block-columns {
    width: 95% !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 3% !important;
    box-sizing: border-box !important;
}

/* Mobile layout */
@media (max-width: 768px) {
    body:has(.page-hero.contact-banner) .entry-content .wp-block-columns {
        width: 100% !important;
        padding: 5% !important;
    }
}

/* Roof2Root Contact - clickable phone and email links */

body:has(.page-hero.contact-banner) .entry-content a[href^="tel:"],
body:has(.page-hero.contact-banner) .entry-content a[href^="mailto:"] {
    color: #24513B !important;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
    display: inline-block;
    transition: transform 0.2s ease, color 0.2s ease;
}

/* Slight enlargement when hovering */

body:has(.page-hero.contact-banner) .entry-content a[href^="tel:"]:hover,
body:has(.page-hero.contact-banner) .entry-content a[href^="mailto:"]:hover {
    color: #C58B3C !important;
    transform: scale(1.06);
}

/* ROOF2ROOT - GLOBAL INTERACTIVE HOVER EFFECT */

/* Interactive elements */
a[href],
button,
input[type="submit"],
input[type="button"],
input[type="reset"],
[role="button"],
[role="link"],
summary {
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        color 0.25s ease !important;
}

/* Hover animation for mouse users */
@media (hover: hover) and (pointer: fine) {
    a[href]:hover,
    button:hover,
    input[type="submit"]:hover,
    input[type="button"]:hover,
    input[type="reset"]:hover,
    [role="button"]:hover,
    [role="link"]:hover,
    summary:hover {
        transform: translateY(-3px) scale(1.04);
    }
}

/* Ensure ordinary text links can animate */
.entry-content a[href],
.site-footer a[href],
a[href^="tel:"],
a[href^="mailto:"] {
    display: inline-block;
}

/* Stronger effect for buttons */
@media (hover: hover) and (pointer: fine) {
    button:hover,
    input[type="submit"]:hover,
    input[type="button"]:hover,
    .btn:hover,
    .wp-block-button__link:hover {
        transform: translateY(-4px) scale(1.05);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.20);
    }
}

/* Keyboard accessibility */
a[href]:focus-visible,
button:focus-visible,
input[type="submit"]:focus-visible {
    outline: 2px solid #C58B3C;
    outline-offset: 3px;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    a[href],
    button,
    input[type="submit"],
    input[type="button"],
    input[type="reset"],
    [role="button"],
    [role="link"],
    summary {
        transition: none !important;
    }

    a[href]:hover,
    button:hover,
    input[type="submit"]:hover,
    input[type="button"]:hover,
    input[type="reset"]:hover,
    [role="button"]:hover,
    [role="link"]:hover,
    summary:hover {
        transform: none !important;
    }
}

/* ROOF2ROOT - COMPACT BACK BUTTON */

#roof2root-back {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 9998;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    background: #24513B;
    color: #FFFFFF;
    border: 1px solid #C58B3C;
    border-radius: 30px;

    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;

    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.20);

    transition:
        transform 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

#roof2root-back:hover {
    background: #C58B3C;
    color: #202020;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 7px 16px rgba(0,0,0,0.22);
}

@media (max-width: 768px) {
    #roof2root-back {
        bottom: 15px;
        left: 15px;
        padding: 9px 12px;
        font-size: 13px;
    }
}

/* Roof2Root - Position Back button above Up button */

#roof2root-back {
    left: 25px !important;
    right: auto !important;
    bottom: 65px !important;
}

@media (max-width: 768px) {
    #roof2root-back {
        left: 15px !important;
        right: auto !important;
        bottom: 55px !important;
    }
}

/* ROOF2ROOT - ALL ACTION BUTTONS SAME GOLD */

:root {
    --r2r-button-gold: #E8A13D;
    --r2r-button-hover: #C98427;
}

/* All standard action buttons */
a.btn,
.btn-amber,
.btn-green,
a.header-quote,
a.float-call,
.wp-block-button__link,
.wp-element-button,
button[type="submit"],
input[type="submit"],
.contact-form button,
.contact-form input[type="submit"],
a[href^="tel:"][class*="button"],
a[href^="tel:"][class*="btn"] {
    background: var(--r2r-button-gold) !important;
    background-color: var(--r2r-button-gold) !important;
    color: #202020 !important;
    border-color: var(--r2r-button-gold) !important;
}

/* Same darker gold when hovering */
a.btn:hover,
.btn-amber:hover,
.btn-green:hover,
a.header-quote:hover,
a.float-call:hover,
.wp-block-button__link:hover,
.wp-element-button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover,
.contact-form button:hover,
.contact-form input[type="submit"]:hover,
a[href^="tel:"][class*="button"]:hover,
a[href^="tel:"][class*="btn"]:hover {
    background: var(--r2r-button-hover) !important;
    background-color: var(--r2r-button-hover) !important;
    color: #202020 !important;
    border-color: var(--r2r-button-hover) !important;
}

/* ROOF2ROOT - WIDEN INNER PAGES */

.content-area > .container {
    width: 95% !important;
    max-width: none !important;
}

.content-area .entry-content {
    width: 100% !important;
    max-width: none !important;
}

/* ROOF2ROOT - HIDE LARGE FEATURED IMAGE ON ALL SERVICE PAGES */

body.single-service .entry-content > div:has(> img.wp-post-image) {
    display: none !important;
}
/* Roof2Root - Centre floating contact icons */

.float-buttons .float-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

.float-buttons .float-btn svg {
    display: block !important;
    width: 28px !important;
    height: 28px !important;
    margin: 0 !important;
    flex-shrink: 0;
}