/* =========================================================
   JF Services — style.css v9.0
   Theme palette (matched from site screenshot):
     dark-brown   #2b1b17   (headings, dark bg)
     bronze-gold  #c8951a   (primary accent — matches theme's amber/bronze)
     bronze-dark  #a87816   (hover state)
     cream-bg     #f5f0e8   (card / section background)
     cream-light  #faf7f4   (lighter cream)
     cream-border #e8dfd0   (borders)
     text         #3d2a1e   (body text)
     text-muted   #8a7568   (secondary text)
   ========================================================= */

/* ---- Base reset ---- */
.jf-services-wrapper *,
.jf-single-wrap *,
.jf-page-banner * {
    box-sizing: border-box;
}
.jf-services-wrapper a,
.jf-single-wrap a {
    text-decoration: none;
    color: inherit;
}

/* =========================================================
   SECTION HEADER
   ========================================================= */
.jf-services-wrapper {
    padding: 64px 0 72px;
}

.jf-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 44px;
    gap: 24px;
    flex-wrap: wrap;
}

.jf-section-left { flex: 1; min-width: 240px; }

.jf-tag-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.jf-tag-bar {
    display: block;
    width: 24px;
    height: 3px;
    background: #c8951a;
    border-radius: 2px;
}

.jf-section-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #c8951a;
    text-transform: uppercase;
}

.jf-section-title {
    font-size: clamp(26px, 3.2vw, 42px);
    font-weight: 800;
    color: #2b1b17;
    line-height: 1.18;
    margin: 0 0 10px;
}

.jf-section-subtitle {
    font-size: 16px;
    color: #8a7568;
    margin: 0;
    max-width: 460px;
    line-height: 1.6;
}

/* Nav buttons */
.jf-section-controls { display: flex; gap: 10px; flex-shrink: 0; }

.jf-nav {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1.5px solid #ddd3c5;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .22s ease;
    color: #2b1b17;
}

.jf-nav svg { width: 17px; height: 17px; }

.jf-nav:hover {
    background: #c8951a;
    border-color: #c8951a;
    color: #fff;
}

/* =========================================================
   CAROUSEL TRACK
   ========================================================= */
.jf-carousel-outer {
    overflow: hidden;
    position: relative;
}

.jf-carousel-outer::after {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 60px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,.85));
    pointer-events: none;
    z-index: 2;
}

.jf-services-carousel {
    display: flex;
    gap: 20px;
    transition: transform .50s cubic-bezier(.4,0,.2,1);
    will-change: transform;
    /* Prevent overflow bleed on mobile */
    width: 100%;
}

/* =========================================================
   SERVICE CARD — clean, on-brand, premium
   ========================================================= */
.jf-service-card {
    /* JS will set width dynamically via cardW() — fallback only */
    min-width: 0;
    flex-shrink: 0;
    /* Default fallback widths (overridden by JS) */
    width: calc(33.333% - 14px);
}

@media (max-width: 1100px) { .jf-service-card { width: calc(50% - 10px); } }
@media (max-width: 640px)  { .jf-service-card { width: calc(100% - 0px); } }

.jf-card-link {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e8dfd0;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
    height: 100%;
}

.jf-card-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 44px rgba(43,27,23,.12);
    border-color: #c8951a;
}

/* Image */
.jf-card-img {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #f0e8dc;
}

.jf-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .50s ease;
}

.jf-card-link:hover .jf-card-img img { transform: scale(1.055); }

.jf-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c8951a;
    opacity: .45;
}

/* Hover overlay */
.jf-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(43,27,23,.48);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .26s ease;
}

.jf-card-link:hover .jf-card-overlay { opacity: 1; }

.jf-overlay-btn {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 1.5px solid rgba(255,255,255,.7);
    padding: 9px 22px;
    border-radius: 40px;
    background: #c8951a;
    border-color: #c8951a;
    transition: background .2s;
}

/* Number badge */
.jf-card-num {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(43,27,23,.82);
    color: #c8951a;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 20px;
    line-height: 1;
    backdrop-filter: blur(4px);
}

/* Card body */
.jf-card-body {
    padding: 20px 20px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    gap: 16px;
    background: #fff;
}

.jf-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #2b1b17;
    margin: 0 0 7px;
    line-height: 1.3;
}

.jf-card-excerpt {
    font-size: 13.5px;
    color: #8a7568;
    margin: 0;
    line-height: 1.65;
}

/* Card footer */
.jf-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #f0e8dc;
    margin-top: auto;
}

.jf-card-cta {
    font-size: 11px;
    font-weight: 700;
    color: #c8951a;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.jf-card-arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #c8951a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .22s, transform .22s;
    flex-shrink: 0;
}

.jf-card-arrow svg { width: 13px; height: 13px; }

.jf-card-link:hover .jf-card-arrow {
    background: #2b1b17;
    transform: translateX(3px);
}

/* =========================================================
   DOTS
   ========================================================= */
.jf-dots-wrap { display: flex; justify-content: center; margin-top: 32px; }

.jf-carousel-dots { display: flex; gap: 7px; align-items: center; }

.jf-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d8ccbf;
    cursor: pointer;
    transition: all .28s ease;
    border: none;
    padding: 0;
}

.jf-dot.active {
    background: #c8951a;
    width: 26px;
    border-radius: 4px;
}

/* =========================================================
   SINGLE SERVICE PAGE
   ========================================================= */

/* Page banner */
.jf-page-banner {
    position: relative;
    background: #2b1b17;
    padding: 80px 24px 60px;
    text-align: center;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.jf-page-banner-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: .2;
}

.jf-page-banner-inner {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

/* Breadcrumb: abaixo do título */
.jf-banner-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    color: rgba(255,255,255,.6);
    flex-wrap: wrap;
    padding: 0;
    margin: 14px 0 0;
}

.jf-banner-breadcrumb a { color: #c8951a; font-weight: 600; text-decoration: none; }
.jf-banner-breadcrumb a:hover { text-decoration: underline; }
.jf-banner-breadcrumb .sep { color: rgba(255,255,255,.3); }

@media (max-width: 767px) {
    .jf-page-banner {
        padding: 110px 20px 48px;
        min-height: 260px;
    }
    .jf-banner-breadcrumb {
        font-size: 12px;
        margin-top: 10px;
    }
}

.jf-banner-title {
    font-size: clamp(28px, 4.5vw, 52px);
    font-weight: 900;
    color: #fff;
    margin: 0;
    line-height: 1.15;
    text-shadow: 0 2px 24px rgba(0,0,0,.3);
}

/* Main layout */
.jf-single-wrap {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
    max-width: 1160px;
    margin: 52px auto 72px;
    padding: 0 24px;
    align-items: start;
}

@media (max-width: 920px) {
    .jf-single-wrap { grid-template-columns: 1fr; gap: 40px; }
    .jf-single-sidebar { position: static !important; top: auto !important; }
}

/* Hero image */
.jf-single-hero {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(43,27,23,.1);
}

.jf-single-hero img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

@media (max-width: 600px) { .jf-single-hero img { height: 240px; } }

.jf-single-hero-badge {
    position: absolute;
    bottom: 18px;
    left: 18px;
    background: #c8951a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 7px 16px;
    border-radius: 30px;
}

/* Content */
.jf-single-title {
    font-size: clamp(24px, 3.2vw, 36px);
    font-weight: 800;
    color: #2b1b17;
    margin: 0 0 16px;
    line-height: 1.2;
}

.jf-single-divider {
    width: 44px;
    height: 4px;
    background: #c8951a;
    border-radius: 2px;
    margin-bottom: 26px;
}

.jf-single-content {
    font-size: 15.5px;
    line-height: 1.8;
    color: #3d2a1e;
}

.jf-single-content h2,
.jf-single-content h3 { color: #2b1b17; margin-top: 30px; }

/* Feature grid */
.jf-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 12px;
    margin: 24px 0 28px;
}

.jf-highlight-item {
    background: #faf7f4;
    border: 1px solid #e8dfd0;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 11px;
}

.jf-highlight-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #2b1b17;
    color: #c8951a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.jf-highlight-icon svg { width: 17px; height: 17px; }

.jf-highlight-text {
    font-size: 13px;
    font-weight: 600;
    color: #2b1b17;
    line-height: 1.35;
}

/* Back link */
.jf-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #c8951a;
    font-weight: 700;
    font-size: 12px;
    text-decoration: none;
    margin-top: 36px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: gap .2s;
}

.jf-back-link:hover { gap: 13px; }
.jf-back-link svg { width: 14px; height: 14px; }

/* =========================================================
   STICKY SIDEBAR
   ========================================================= */
.jf-single-sidebar {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- Estimate card --- */
.jf-estimate-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e8dfd0;
    box-shadow: 0 6px 28px rgba(43,27,23,.08);
}

.jf-estimate-header {
    background: #2b1b17;
    padding: 24px 24px 20px;
    text-align: center;
}

.jf-estimate-header-icon {
    width: 50px;
    height: 50px;
    background: rgba(200,149,26,.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: #c8951a;
}

.jf-estimate-header-icon svg { width: 22px; height: 22px; }

.jf-estimate-header h3 {
    font-size: 19px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 5px;
}

.jf-estimate-header p {
    font-size: 13px;
    color: rgba(255,255,255,.55);
    margin: 0;
    line-height: 1.5;
}

.jf-estimate-strip {
    height: 3px;
    background: linear-gradient(90deg, #c8951a 0%, #e8b840 50%, #c8951a 100%);
}

/* Form */
.jf-estimate-form { padding: 20px 20px 22px; }

.jf-form-group { margin-bottom: 13px; }

.jf-form-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #2b1b17;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.jf-form-group label .req { color: #c8951a; }

.jf-form-group input,
.jf-form-group textarea,
.jf-form-group select {
    width: 100%;
    background: #faf7f4;
    border: 1.5px solid #e0d5c5;
    border-radius: 8px;
    padding: 10px 13px;
    font-size: 14px;
    color: #2b1b17;
    font-family: inherit;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    resize: vertical;
}

.jf-form-group input::placeholder,
.jf-form-group textarea::placeholder { color: #b8a898; }

.jf-form-group input:focus,
.jf-form-group textarea:focus,
.jf-form-group select:focus {
    border-color: #c8951a;
    box-shadow: 0 0 0 3px rgba(200,149,26,.12);
    background: #fff;
}

.jf-form-group textarea { min-height: 84px; }

.jf-form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8951a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    background-size: 15px;
    padding-right: 34px;
    cursor: pointer;
}

/* Submit button */
.jf-submit-btn {
    width: 100%;
    background: #c8951a;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 13px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: background .22s, transform .18s, box-shadow .22s;
    margin-top: 4px;
}

.jf-submit-btn svg { width: 15px; height: 15px; }

.jf-submit-btn:hover {
    background: #2b1b17;
    transform: translateY(-2px);
    box-shadow: 0 7px 22px rgba(43,27,23,.22);
}

.jf-submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* Form message */
.jf-form-message {
    margin-top: 11px;
    padding: 10px 13px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    display: none;
}

.jf-form-message.success {
    background: #f0faf5;
    color: #2e7d52;
    border: 1px solid #b7dfc9;
    display: block;
}

.jf-form-message.error {
    background: #fef2f2;
    color: #c0392b;
    border: 1px solid #f5c6c6;
    display: block;
}

/* --- Contact card --- */
.jf-contact-card {
    background: #faf7f4;
    border-radius: 14px;
    padding: 20px 22px;
    border: 1px solid #e8dfd0;
}

.jf-contact-card-title {
    font-size: 11px;
    font-weight: 700;
    color: #2b1b17;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin: 0 0 16px;
}

.jf-contact-item {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #3d2a1e;
    text-decoration: none;
    font-weight: 500;
    transition: color .18s;
}

.jf-contact-item:last-child { margin-bottom: 0; }
.jf-contact-item:hover { color: #c8951a; }

.jf-contact-ico {
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid #e0d5c5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c8951a;
    flex-shrink: 0;
}

.jf-contact-ico svg { width: 15px; height: 15px; }

/* =========================================================
   FORM SUCCESS STATE  (replaces form fields after submit)
   ========================================================= */
.jf-success-state {
    text-align: center;
    padding: 28px 16px 20px;
    animation: jfFadeIn .4s ease;
}

@keyframes jfFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.jf-success-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c8951a, #e8b840);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #fff;
    box-shadow: 0 6px 20px rgba(200,149,26,.35);
}

.jf-success-state h4 {
    font-size: 16px;
    font-weight: 700;
    color: #2b1b17;
    margin: 0 0 8px;
    line-height: 1.4;
}

.jf-success-state p {
    font-size: 13.5px;
    color: #8a7568;
    margin: 0;
    line-height: 1.6;
}

/* ---- Button loading state ---- */
.jf-btn-loading {
    opacity: .75;
    pointer-events: none;
}

.jf-btn-loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: jfSpin .7s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes jfSpin {
    to { transform: rotate(360deg); }
}

/* ---- Form message inline icons ---- */
.jf-form-message svg {
    vertical-align: middle;
    margin-right: 4px;
    flex-shrink: 0;
}

.jf-form-message {
    display: none;
    align-items: center;
    gap: 6px;
}

.jf-form-message.error,
.jf-form-message.success {
    display: flex;
}

/* =========================================================
   RESPONSIVE FIXES — carousel & section header
   ========================================================= */

/* Wrapper padding mobile */
@media (max-width: 640px) {
    .jf-services-wrapper {
        padding: 40px 0 48px;
    }
}

/* Section header: stack title + controls on mobile */
@media (max-width: 640px) {
    .jf-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 28px;
    }

    .jf-section-controls {
        align-self: flex-start;
    }

    .jf-section-subtitle {
        font-size: 14px;
    }
}

/* Carousel outer must not overflow viewport */
.jf-carousel-outer {
    overflow: hidden;
    position: relative;
    width: 100%;
    max-width: 100%;
}

/* Carousel track: no wrapping, proper flex layout */
.jf-services-carousel {
    flex-wrap: nowrap;
}

/* Card image height on mobile */
@media (max-width: 640px) {
    .jf-card-img {
        height: 190px;
    }
}

/* Dots wrap spacing on mobile */
@media (max-width: 640px) {
    .jf-dots-wrap {
        margin-top: 20px;
    }
}

/* Fade gradient — hide on very small screens to avoid covering card */
@media (max-width: 480px) {
    .jf-carousel-outer::after {
        display: none;
    }
}

/* =========================================================
   SINGLE SERVICE PAGE — Hide desktop nav on mobile
   The Elementor header renders both a desktop nav and a
   mobile hamburger menu. On mobile, hide the desktop nav.
   ========================================================= */
@media (max-width: 767px) {

    /* --- Elementor Nav Menu widget (desktop layout) --- */
    /* The desktop nav is the <nav> inside the nav-menu widget.
       Elementor hides the hamburger on desktop using elementor-hidden-phone/tablet.
       We hide the desktop nav links on mobile. */
    .jf-service-page .elementor-nav-menu--main,
    .jf-service-page .elementor-nav-menu--layout-horizontal,
    .jf-service-page .elementor-nav-menu > ul,
    .jf-service-page nav.elementor-nav-menu,
    .jf-service-page .elementor-widget-nav-menu > .elementor-widget-container > nav,

    /* Elementor "Nav Menu" new widget (e-n-menu) */
    .jf-service-page .e-n-menu,
    .jf-service-page .e-n-menu-items,

    /* Elementor visibility helpers — items marked "hide on mobile" */
    .jf-service-page .elementor-hidden-phone,
    .jf-service-page .elementor-hidden-mobile,

    /* Common WordPress/theme desktop nav IDs and classes */
    .jf-service-page #site-navigation,
    .jf-service-page .main-navigation ul,
    .jf-service-page .desktop-nav,
    .jf-service-page nav.nav-menu,
    .jf-service-page .nav-menu:not(.elementor-nav-menu) {
        display: none !important;
    }

    /* Make sure the Elementor hamburger/toggle IS visible on mobile */
    .jf-service-page .elementor-menu-toggle,
    .jf-service-page .elementor-nav-menu--dropdown,
    .jf-service-page .e-n-menu-toggle {
        display: flex !important;
    }

}
