/**
* Theme Name: Rebuilto Child
* Description: This is a child theme of Rebuilto, generated by Merlin WP.
* Author: <a href="https://wpopal.com/">Opalthemes</a>
* Template: rebuilto
* Version: 1.1.7
*/

/* ============================================================
   Home page iconbox carousel — equal height cards
   JS in functions.php sets minHeight; CSS makes inner content
   fill that height so the button is pushed to the bottom.
   ============================================================ */
.elementor-element-8fcf7f3 .elementor-icon-box-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.elementor-element-8fcf7f3 .elementer-icon-box-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.elementor-element-8fcf7f3 .elementor-icon-box-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.elementor-element-8fcf7f3 .elementor-icon-box-description {
    flex: 1;
}
.elementor-element-8fcf7f3 .elementor-button {
    margin-top: auto;
}

/* ============================================================
   Services mega menu: rebuilto-services widget styling
   Matches the original hardcoded button links appearance
   ============================================================ */

/* Remove the list-item bullet from the mega menu li wrapper */
.main-navigation .mega-menu .mega-menu-item {
    list-style: none;
}

/* Service items: no background, no box effects — including hover/current state */
.main-navigation .mega-menu .service-item.service-style-6,
.main-navigation .mega-menu .service-item.service-style-6.current_post {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0;
    margin: 0;
}

/* h3 reset — match button font size */
.main-navigation .mega-menu .service-item.service-style-6 .service-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

/* Convert grid to flex to match the rest of the mega menu layout */
.main-navigation .mega-menu .elementor-service-wrapper .d-grid {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0 !important;
}

.main-navigation .mega-menu .elementor-service-wrapper .d-grid .grid-item {
    width: 50%;
}

.main-navigation .mega-menu .elementor-service-wrapper .d-grid .grid-item:nth-child(odd) {
    padding-right: 45px;
}

.main-navigation .mega-menu .elementor-service-wrapper .d-grid .grid-item:nth-child(even) {
    padding-left: 45px;
}

/* Link: full-width flex row, white text, bottom border separator */
.main-navigation .mega-menu .service-item.service-style-6 .service-title a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
    text-decoration: none;
    padding: 20px 0;
    border-bottom: 1px solid #ffffff;
    width: 100%;
}

.main-navigation .mega-menu .service-item.service-style-6 .service-title a:hover,
.main-navigation .mega-menu .service-item.service-style-6.current_post .service-title a {
    color: var(--primary) !important;
    background-color: transparent !important;
}

/* Hide the ::before bullet — out-specifics elementor.css (.service-item.service-style-6 .service-title a:before) */
.main-navigation .service-item.service-style-6 .service-title a::before {
    display: none !important;
    content: none !important;
    background: none !important;
}

/* Icon: swap chevron-right → arrow-up-right, apply primary colour */
.main-navigation .mega-menu .service-item.service-style-6 .service-title a i {
    color: var(--primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.main-navigation .mega-menu .service-item.service-style-6 .service-title a i::before {
    content: "\e008"; /* rebuilto-icon-arrow-up-right */
    font-family: "rebuilto-icon";
}

.main-navigation .mega-menu .service-item.service-style-6 .service-title a:hover i {
    transform: rotate(45deg);
}

/* ============================================================
   Service page — Related Blog Posts section
   ============================================================ */
.service-related-blogs {
    padding: 80px 0;
    background: #f9f9f9;
}
.service-related-blogs .container,
.service-locations-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}
.service-related-blogs .section-header,
.service-locations-section .section-header {
    text-align: center;
    margin-bottom: 50px;
}
.section-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--primary);
    text-transform: lowercase;
    margin-bottom: 10px;
}
.section-title {
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 700;
    color: var(--heading);
    margin-bottom: 15px;
    line-height: 1.2;
}
.section-intro {
    font-size: 16px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}
.service-blogs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}
@media (max-width: 768px) {
    .service-blogs-grid { grid-template-columns: 1fr; }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .service-blogs-grid { grid-template-columns: repeat(2, 1fr); }
}
.service-blog-card {
    background: #fff;
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
}
.service-blog-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}
.blog-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.blog-card-content {
    padding: 25px 30px 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.blog-card-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}
.blog-card-title a {
    color: var(--heading);
    text-decoration: none;
}
.blog-card-title a:hover { color: var(--primary); }
.blog-card-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 18px;
}
.blog-card-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}
.blog-card-link:hover { color: var(--heading); }
.service-blogs-footer,
.service-locations-footer {
    text-align: center;
    margin-top: 40px;
}

/* ============================================================
   Service page — Service Areas / Locations section
   ============================================================ */
.service-locations-section {
    padding: 80px 0;
    background: #fff;
}
.service-locations-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}
.service-location-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 500;
    color: var(--heading);
    text-decoration: none;
    transition: all 0.3s ease;
    background: #fff;
}
.service-location-chip:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.service-location-chip i {
    font-size: 12px;
    color: var(--primary);
    transition: color 0.3s ease;
}
.service-location-chip:hover i { color: #fff; }
}

/* ============================================================
   Homepage blog section — space between "news & events" title
   and the blog post grid cards. Elementor margin setting is
   overridden by flex-row layout on the parent; force it here.
   ============================================================ */
.elementor-element-8c83377 {
    margin-top: 80px !important;
}

/* Service pages — Insights & Service Areas headings */
.section-heading-mb.elementor-widget-heading {
    margin-bottom: 45px !important;
    margin-block-end: 45px !important;
}
.section-heading-mb .elementor-heading-title {
    margin-bottom: 0;
}

/* ============================================================
   About Us — counter number spacing fix
   Odometer groups digits per-column; hide the thousands separator
   mark so "1,008" renders as "1008" without a visible gap.
   ============================================================ */
.elementor-element-e54b76a .odometer-formatting-mark,
.elementor-element-141b24c .odometer-formatting-mark {
    display: none;
}
/* Tighten digit columns so proportional "1" doesn't look isolated */
.elementor-element-e54b76a .odometer-digit,
.elementor-element-141b24c .odometer-digit {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* ============================================================
   Projects widget — image aspect ratio matches blog/news cards
   Blog uses rebuilto-post-grid (765×495 = 64.7% h/w ratio).
   We override the theme's 77% portrait ratio to match.
   ============================================================ */
.elementor-widget-rebuilto-projects .project-post-thumbnail {
    padding-top: 65% !important;
    height: auto !important;
    overflow: hidden;
    position: relative;
}
.elementor-widget-rebuilto-projects .project-post-thumbnail img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

