/*
 Theme Name:   Hello Elementor Child
 Theme URI:    https://andreibuild.com
 Description:  Child theme for Hello Elementor – Andrei Build renovations & construction
 Author:       Andrei Build
 Author URI:   https://andreibuild.com
 Template:     hello-elementor
 Version:      1.2.0
 Requires at least: 6.0
 Requires PHP: 8.2
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  andrei-build
*/

/* ==========================================================================
   Child theme styles go below this line.
   Parent theme styles are enqueued via functions.php.
   ========================================================================== */

/* ==========================================================================
   Global
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* ==========================================================================
   Typography Refinements
   ========================================================================== */

/* Section label styling — italic serif with "/" prefix */
.elementor-widget-heading .elementor-heading-title {
    transition: opacity 0.3s ease;
}

/* ==========================================================================
   Header — Scroll Transition
   ========================================================================== */

/* Header starts transparent on hero pages, transitions to solid */
.elementor-location-header .elementor-element {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* ==========================================================================
   Buttons — Hover Transitions
   ========================================================================== */

.elementor-button {
    transition: all 0.3s ease !important;
}

.elementor-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Orange button hover */
.elementor-button[style*="background-color: rgb(238, 116, 22)"]:hover,
.elementor-button[style*="background-color:#EE7416"]:hover {
    background-color: #CC5F0F !important;
}

/* ==========================================================================
   Service Circles — Hover Border Effect
   ========================================================================== */

.ab-service-circle {
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.ab-service-circle:hover {
    border-color: #EE7416 !important;
    transform: scale(1.05);
}

/* ==========================================================================
   Testimonial Cards — Dashed Border + Shadow
   ========================================================================== */

.elementor-element[style*="border-style: dashed"] {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.elementor-element[style*="border-style: dashed"]:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1) !important;
}

/* ==========================================================================
   Project Cards — Hover Overlay
   ========================================================================== */

.elementor-container [style*="min-height: 400px"],
.elementor-container [style*="min-height: 300px"] {
    transition: transform 0.4s ease;
    overflow: hidden;
}

.elementor-container [style*="min-height: 400px"]:hover,
.elementor-container [style*="min-height: 300px"]:hover {
    transform: scale(1.02);
}

/* ==========================================================================
   Footer Links — Hover Effect
   ========================================================================== */

.elementor-location-footer a {
    transition: color 0.3s ease;
}

.elementor-location-footer a:hover {
    color: #EE7416 !important;
}

/* ==========================================================================
   Form Styling
   ========================================================================== */

.elementor-field-group input,
.elementor-field-group textarea,
.elementor-field-group select {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.elementor-field-group input:focus,
.elementor-field-group textarea:focus,
.elementor-field-group select:focus {
    border-color: #EE7416 !important;
    box-shadow: 0 0 0 2px rgba(238, 116, 22, 0.15);
    outline: none;
}

/* ==========================================================================
   Layout Classes — CSS-driven widths (Elementor width bug workaround)
   ========================================================================== */

/* --- Split Row (About section: 50/50 image + text) --- */
.ab-split-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
}

.ab-col-half {
    width: 50% !important;
    flex: 0 0 50% !important;
    max-width: 50% !important;
}

/* --- Services Grid --- */
.ab-services-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 20px !important;
}

.ab-service-card {
    width: calc(25% - 15px) !important;
    flex: 0 0 calc(25% - 15px) !important;
    max-width: calc(25% - 15px) !important;
    text-align: center;
}

.ab-service-circle {
    width: 180px !important;
    height: 180px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    margin: 0 auto 20px auto !important;
    border: 3px solid #E5E5E5;
    flex: 0 0 180px !important;
    max-width: 180px !important;
}

/* --- Projects Grid --- */
.ab-projects-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
}

.ab-project-card {
    width: calc(50% - 10px) !important;
    flex: 0 0 calc(50% - 10px) !important;
    max-width: calc(50% - 10px) !important;
    overflow: hidden;
    transition: transform 0.4s ease !important;
}

.ab-project-card:hover {
    transform: scale(1.02);
}

/* --- Stats Row --- */
.ab-stats-row {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-around !important;
    align-items: center !important;
}

.ab-stat-item {
    width: 25% !important;
    flex: 0 0 25% !important;
    max-width: 25% !important;
    text-align: center;
}

/* --- Process Steps Grid --- */
.ab-steps-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 20px !important;
}

.ab-step-card {
    width: calc(25% - 15px) !important;
    flex: 0 0 calc(25% - 15px) !important;
    max-width: calc(25% - 15px) !important;
    text-align: center;
}

/* --- Testimonials Grid --- */
.ab-testimonials-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 25px !important;
}

.ab-testimonial-card {
    width: calc(33.333% - 17px) !important;
    flex: 0 0 calc(33.333% - 17px) !important;
    max-width: calc(33.333% - 17px) !important;
    background: #FFFFFF;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.ab-testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1) !important;
}

/* --- Hero Buttons Row --- */
.ab-hero-buttons {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 15px !important;
    margin-top: 30px !important;
}

/* --- CTA Section --- */
.ab-cta {
    position: relative;
}

/* ==========================================================================
   Counter Widget — Stats Section
   ========================================================================== */

.ab-stat-item .elementor-counter-number-wrapper {
    font-size: 48px;
    font-weight: 700;
    color: #EE7416;
}

.ab-stat-item .elementor-counter-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ==========================================================================
   Star Rating — Testimonials
   ========================================================================== */

.ab-testimonial-card .elementor-star-rating {
    margin-bottom: 15px;
}

.ab-testimonial-card .elementor-star-rating i {
    color: #EE7416;
}

/* ==========================================================================
   Service Single — Features + Process Blocks
   ========================================================================== */

.ab-service-section-title {
    font-family: "Work Sans", sans-serif;
    font-weight: 900;
    font-size: 32px;
    letter-spacing: -1px;
    line-height: 1;
    text-transform: uppercase;
    color: #0A0C10;
    margin: 56px 0 24px;
}

.ab-feature-grid {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 32px;
}

@media (max-width: 600px) {
    .ab-feature-grid { grid-template-columns: 1fr; }
}

.ab-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #4B5563;
}

.ab-feature-icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    background: #FF7A00;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    margin-top: 2px;
}

.ab-process-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
    counter-reset: none;
}

.ab-process-step {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 24px;
    align-items: start;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(10, 12, 16, 0.08);
}

.ab-process-step:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.ab-process-num {
    font-family: "Work Sans", sans-serif;
    font-weight: 900;
    font-size: 56px;
    line-height: 1;
    color: #FF7A00;
    letter-spacing: -2px;
}

.ab-process-title {
    font-family: "Work Sans", sans-serif;
    font-weight: 900;
    font-size: 22px;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    color: #0A0C10;
    margin: 0 0 8px;
    line-height: 1.1;
}

.ab-process-desc {
    font-family: "Inter", sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #4B5563;
    margin: 0;
}

@media (max-width: 600px) {
    .ab-process-step { grid-template-columns: 56px 1fr; gap: 16px; }
    .ab-process-num { font-size: 40px; }
}

/* ==========================================================================
   Animations — Smooth Performance
   ========================================================================== */

.elementor-invisible {
    visibility: hidden;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .elementor-button:hover {
        transform: none;
    }

    .ab-service-circle:hover {
        transform: none;
    }

    [class*="animated"] {
        animation: none !important;
        transition: none !important;
    }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

/* Tablet breakpoint */
@media (max-width: 1024px) {
    .ab-service-card,
    .ab-step-card {
        width: calc(50% - 10px) !important;
        flex: 0 0 calc(50% - 10px) !important;
        max-width: calc(50% - 10px) !important;
    }

    .ab-testimonial-card {
        width: calc(50% - 13px) !important;
        flex: 0 0 calc(50% - 13px) !important;
        max-width: calc(50% - 13px) !important;
    }

    .ab-stat-item {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
        margin-bottom: 30px;
    }
}

@media (max-width: 767px) {
    /* Default section padding on mobile — top-level containers ONLY.
       Without ".e-parent" the old rule cascaded to every nested inner container
       and stacked 60px × depth, making pages 5-10× taller than needed on mobile.
       Specificity kept low (0,2,0) so per-page Padding-Mobile values still win. */
    .elementor-section.elementor-top-section,
    .e-con.e-parent {
        --padding-top: 40px;
        --padding-bottom: 40px;
    }

    /* Nested inner containers: zero vertical padding by default on mobile.
       We target --padding-top / --padding-bottom (not --padding-block-*) so that
       Elementor's per-page rules — which also set --padding-top/bottom and have
       higher specificity — correctly override this default. */
    .e-con.e-child {
        --padding-top: 0px;
        --padding-bottom: 0px;
    }

    /* Split row stacks on mobile */
    .ab-split-row {
        flex-direction: column !important;
    }

    .ab-col-half {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .ab-col-half[style*="padding: 80px"] {
        padding: 50px 25px !important;
    }

    /* Cards stack single column on mobile */
    .ab-service-card,
    .ab-step-card {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .ab-project-card {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .ab-testimonial-card {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .ab-stat-item {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
        margin-bottom: 20px;
    }

    /* Hero buttons stack on mobile */
    .ab-hero-buttons {
        flex-direction: column !important;
        align-items: center !important;
    }

    /* Ensure buttons don't overflow on mobile */
    .elementor-button-wrapper {
        width: 100%;
    }

    .elementor-button {
        width: 100%;
        text-align: center;
    }
}
