/* ================================================================
   Enable Life — fixes.css
   Load this AFTER layout.css in header.php
   Add this line in header.php after layout.css link:
   <link href="<?php echo get_template_directory_uri(); ?>/css/fixes.css" rel="stylesheet">
   ================================================================ */


/* ================================================================
   FIX 1: FORM FIELDS
   Problem: global input/select/textarea style was breaking
   CF7 multistep form, Zoho forms, and all other forms
   ================================================================ */

/* Remove global input styling — scope only to wpcf7 */
input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
}

/* CF7 forms only — scoped so Zoho/other forms not affected */
.wpcf7-form p { margin-bottom: 0; }

.wpcf7-form .wpcf7-text,
.wpcf7-form .wpcf7-email,
.wpcf7-form .wpcf7-tel,
.wpcf7-form .wpcf7-number,
.wpcf7-form .wpcf7-date,
.wpcf7-form .wpcf7-select,
.wpcf7-form .wpcf7-textarea {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 15px;
    font-family: 'Poppins-Regular', sans-serif;
    color: #111827;
    background: #fff;
    transition: border-color 0.25s;
    margin-bottom: 10px;
    display: block;
    box-sizing: border-box;
}
.wpcf7-form .wpcf7-text:focus,
.wpcf7-form .wpcf7-email:focus,
.wpcf7-form .wpcf7-tel:focus,
.wpcf7-form .wpcf7-select:focus,
.wpcf7-form .wpcf7-textarea:focus {
    border-color: #1c773a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(28,119,58,0.08);
}
.wpcf7-form .wpcf7-textarea {
    min-height: 110px;
    resize: vertical;
}
.wpcf7-form input[type="submit"],
.wpcf7-form .wpcf7-submit {
    background: #1c773a;
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Poppins-Medium', sans-serif;
    cursor: pointer;
    transition: background 0.25s;
    width: auto;
    margin-bottom: 0;
    display: inline-block;
}
.wpcf7-form input[type="submit"]:hover,
.wpcf7-form .wpcf7-submit:hover {
    background: #155a2c;
}

/* Service sidebar form inputs */
.service-form .wpcf7-form .wpcf7-text,
.service-form .wpcf7-form .wpcf7-email,
.service-form .wpcf7-form .wpcf7-tel,
.service-form .wpcf7-form .wpcf7-select,
.service-form .wpcf7-form .wpcf7-textarea {
    font-size: 14px;
    padding: 10px 12px;
    margin-bottom: 10px;
}
.service-form .wpcf7-form input[type="submit"] {
    width: 100%;
    padding: 12px;
}

/* Contact form 7 error/validation */
.wpcf7-not-valid-tip {
    color: #dc3232;
    font-size: 13px !important;
    display: block;
    margin-top: -6px;
    margin-bottom: 8px;
}
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output {
    display: none !important;
}
.wpcf7-spinner { position: absolute !important; }

/* Multistep form — don't override its styling */
.multistep-form input,
.multistep-form select,
.multistep-form textarea { border-radius: 4px; }


/* ================================================================
   FIX 2: BOOTSTRAP .item CLASS CONFLICT
   Problem: .item in layout.css was styling Bootstrap carousel items
   which are also called .item — blog slider and main slider broke
   ================================================================ */

/* Undo .item styles for carousel children */
.bs-slider .carousel-inner > .item,
.latest-blog .carousel-inner > .item,
#blog-slider .carousel-inner > .item,
#main-slider .carousel-inner > .item {
    width: 100%;
    margin: 0;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    border: none;
    box-shadow: none;
    transform: none;
    padding: 0;
}
.bs-slider .carousel-inner > .item:hover,
.latest-blog .carousel-inner > .item:hover,
#blog-slider .carousel-inner > .item:hover {
    transform: none;
    box-shadow: none;
    border: none;
}

/* Service grid items — properly scoped */
.latest-projects-items .item {
    width: calc(33.333% - 24px);
    margin: 12px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: all 0.25s;
    position: relative;
    float: none;
    display: inline-block;
    vertical-align: top;
}
.latest-projects-items .item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 32px rgba(28,119,58,0.14);
    border-color: #1c773a;
}
.latest-projects-items .item .img-responsive {
    overflow: hidden;
    height: 210px;
}
.latest-projects-items .item .img-responsive img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
    display: block;
}
.latest-projects-items .item:hover .img-responsive img {
    transform: scale(1.06);
}


/* ================================================================
   FIX 3: HEADER — sticky was conflicting with responsive.css
   Problem: responsive.css had position:fixed rules for .header
   that were fighting with our sticky
   ================================================================ */
.header {
    position: sticky !important;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* Remove old margin-top from slider — no longer needed with sticky */
.home-slider { margin-top: 0 !important; }
.inner-banner { margin-top: 0 !important; }

/* Old .header-fixed.navbar-fixed was adding fixed position on scroll —
   disable this JS-added class from re-positioning header */
.header-fixed.navbar-fixed {
    position: static !important;
    box-shadow: none !important;
    animation: none !important;
    background: transparent !important;
}


/* ================================================================
   FIX 4: BUTTONS
   Problem: old .cs-btn was grey (#88888d) — now green
   Some button styles weren't applying correctly
   ================================================================ */
.cs-btn a {
    display: inline-block;
    font-size: 14px;
    color: #fff !important;
    background-color: #1c773a !important;
    padding: 10px 26px;
    border-radius: 8px;
    border: 2px solid #1c773a;
    text-transform: none;
    transition: all 0.25s;
    font-family: 'Poppins-Medium', sans-serif;
}
.cs-btn a:hover {
    background-color: #155a2c !important;
    border-color: #155a2c !important;
    color: #fff !important;
}

/* Detail button on service listing */
.detail_btn {
    display: inline-block;
    background: #1c773a;
    color: #fff !important;
    font-size: 13px;
    padding: 8px 20px;
    border-radius: 6px;
    transition: background 0.25s;
}
.detail_btn:hover { background: #155a2c; color: #fff !important; }

/* Contact button in CTA bar */
.contact_btn {
    display: inline-block;
    background: #fff;
    color: #1c773a !important;
    font-family: 'Poppins-Medium', sans-serif;
    font-size: 14px;
    padding: 12px 28px;
    border-radius: 8px;
    transition: all 0.25s;
    border: 2px solid #fff;
}
.contact_btn:hover {
    background: transparent;
    color: #fff !important;
}


/* ================================================================
   FIX 5: WHY CHOOSE US — icon_box sprite images
   Problem: icon_box had background-image sprite positions
   that were showing wrong images with new green bg
   ================================================================ */
.icon_box {
    background-image: none !important;
    background-color: #eaf4ee !important;
    background-position: center !important;
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
}
.icon_box img {
    width: 28px !important;
    height: 28px !important;
    object-fit: contain !important;
    display: block;
    margin: 0 auto !important;
}
/* item_box layout fix */
.item_box {
    display: flex !important;
    align-items: flex-start;
    gap: 16px;
    background: #fff;
    border-radius: 16px;
    padding: 22px 20px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: all 0.25s;
    vertical-align: top;
}
.item_box:hover {
    box-shadow: 0 8px 32px rgba(28,119,58,0.14);
    border-color: #1c773a;
    transform: translateY(-3px);
}
.contant_box { flex: 1; }
.contant_box a {
    display: block;
    font-family: 'Poppins-Medium', sans-serif;
    font-size: 15px;
    color: #111827;
    margin-bottom: 6px;
}
.contant_box a:hover { color: #1c773a; }
.contant_box p { font-size: 14px; color: #4b5563; margin: 0; }


/* ================================================================
   FIX 6: CTA SECTION (.work)
   ================================================================ */
.work {
    background: linear-gradient(135deg, #155a2c 0%, #1c773a 100%) !important;
    padding: 56px 0;
}
.workk {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.workk h2 {
    color: #fff !important;
    font-size: 1.8rem;
    margin: 0;
}
.workk h6 a { color: #fff !important; }
.workk h6 a:hover { opacity: 0.85; }


/* ================================================================
   FIX 7: BLOG SECTION
   Problem: blog carousel .col-md-4 items showing inline
   ================================================================ */
.lb-sec .carousel-inner .col-md-4 {
    padding: 0 10px;
}
.boxx {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: all 0.25s;
    margin-bottom: 24px;
}
.boxx:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 32px rgba(28,119,58,0.14);
    border-color: #1c773a;
}
.boxx .img_box { overflow: hidden; height: 200px; }
.boxx .img_box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
    display: block;
}
.boxx:hover .img_box img { transform: scale(1.05); }

.blog_item {
    background: #fff;
    padding: 18px 20px;
    position: relative;
    z-index: 1;
}
.date_box {
    font-size: 12px;
    color: #1c773a;
    font-family: 'Poppins-Medium', sans-serif;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.blog_item .heading a h3 {
    font-family: 'Poppins-Medium', sans-serif;
    font-size: 16px;
    color: #111827;
    margin-bottom: 10px;
    line-height: 1.4;
    transition: color 0.25s;
}
.blog_item .heading a:hover h3 { color: #1c773a; }
.blog_item p { font-size: 14px; color: #4b5563; margin-bottom: 12px; }
.blog_item a { font-size: 14px; font-family: 'Poppins-Medium', sans-serif; color: #1c773a; }
.blog_item a:hover { color: #155a2c; }


/* ================================================================
   FIX 8: FOOTER
   ================================================================ */
footer { background: #0f1923 !important; }

/* Fix footer nav list — was inheriting blog item styles */
.f-top ul { list-style: none; padding: 0; margin: 0; }
.f-top ul li { margin-bottom: 10px; border: none; background: transparent; border-radius: 0; padding: 0; box-shadow: none; }
.f-top ul li:hover { transform: none; border: none; }
.f-top ul li a {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s;
    font-family: 'Poppins-Regular', sans-serif;
    padding: 0 !important;
}
.f-top ul li a::before { content: '›'; color: #1c773a; font-size: 18px; line-height: 1; }
.f-top ul li a:hover { color: #fff; padding-left: 4px !important; }


/* ================================================================
   FIX 9: MOBILE — responsive fixes
   ================================================================ */
@media (max-width: 768px) {
    .latest-projects-items .item {
        width: calc(50% - 24px);
    }
    .workk {
        flex-direction: column;
        text-align: center;
    }
    .workk h2 { font-size: 1.4rem; }
    .item_box { flex-direction: column; }
    .icon_box { margin: 0 auto 12px !important; }
}

@media (max-width: 480px) {
    .latest-projects-items .item {
        width: calc(100% - 24px);
    }
}
