/*
 * TorqSync — Forest theme
 * Palette: #F5F5F4 (bg) | #F49E55 (primary/orange) | #9FA9A7 (secondary/sage)
 *          #7F6F6D (muted) | #3C4D4A (dark/forest green) | #191919 (text)
 *
 * Used by: KB Small Engine Repair (KB pages via _LayoutKB.cshtml)
 */

/* ── Bootstrap root variables ────────────────────────────────────────────── */
:root {
    /* Brand palette */
    --bs-primary:                 #F49E55;
    --bs-primary-rgb:             244, 158, 85;

    --bs-secondary:               #9FA9A7;
    --bs-secondary-rgb:           159, 169, 167;

    --bs-success:                 #4a7c59;
    --bs-success-rgb:             74, 124, 89;

    --bs-info:                    #5b8fa8;
    --bs-info-rgb:                91, 143, 168;

    --bs-warning:                 #d97706;
    --bs-warning-rgb:             217, 119, 6;

    --bs-danger:                  #b91c1c;
    --bs-danger-rgb:              185, 28, 28;

    --bs-light:                   #F5F5F4;
    --bs-light-rgb:               245, 245, 244;

    --bs-dark:                    #3C4D4A;
    --bs-dark-rgb:                60, 77, 74;

    /* Body */
    --bs-body-color:              #191919;
    --bs-body-color-rgb:          25, 25, 25;
    --bs-body-bg:                 #F5F5F4;
    --bs-body-bg-rgb:             245, 245, 244;

    --bs-secondary-color:         #7F6F6D;
    --bs-secondary-color-rgb:     127, 111, 109;
    --bs-secondary-bg:            #ece9e8;
    --bs-secondary-bg-rgb:        236, 233, 232;

    --bs-tertiary-color:          rgba(25, 25, 25, 0.40);
    --bs-tertiary-bg:             #f0edec;
    --bs-tertiary-bg-rgb:         240, 237, 236;

    --bs-emphasis-color:          #191919;
    --bs-heading-color:           #191919;

    /* Links */
    --bs-link-color:              #c07534;
    --bs-link-color-rgb:          192, 117, 52;
    --bs-link-hover-color:        #a05e25;
    --bs-link-hover-color-rgb:    160, 94, 37;

    /* Borders */
    --bs-border-color:            #d8d3d2;
    --bs-border-radius:           0.4rem;
    --bs-border-radius-sm:        0.25rem;
    --bs-border-radius-lg:        0.6rem;
    --bs-border-radius-xl:        1rem;
    --bs-border-radius-xxl:       1.5rem;
    --bs-border-radius-pill:      50rem;

    /* Shadows */
    --bs-box-shadow:              0 4px 16px rgba(25, 25, 25, 0.10);
    --bs-box-shadow-sm:           0 1px 4px rgba(25, 25, 25, 0.08);
    --bs-box-shadow-lg:           0 8px 32px rgba(25, 25, 25, 0.14);

    /* Focus ring */
    --bs-focus-ring-color:        rgba(244, 158, 85, 0.30);

    /* Typography */
    --bs-font-sans-serif:         "Inter", system-ui, -apple-system, sans-serif;
    --bs-body-font-family:        var(--bs-font-sans-serif);
    --bs-body-line-height:        1.6;
}

/* ── Buttons ──────────────────────────────────────────────────────────────
 * Bootstrap 5.3 compiled CSS hardcodes #0d6efd in --bs-btn-bg on each
 * button variant, so overriding --bs-primary on :root is not enough —
 * every component-level variable must also be set here.
 * ─────────────────────────────────────────────────────────────────────── */
.btn-primary {
    --bs-btn-bg:                  #F49E55;
    --bs-btn-border-color:        #F49E55;
    --bs-btn-color:               #191919;
    --bs-btn-hover-bg:            #e08840;
    --bs-btn-hover-border-color:  #e08840;
    --bs-btn-hover-color:         #191919;
    --bs-btn-active-bg:           #cc7a39;
    --bs-btn-active-border-color: #cc7a39;
    --bs-btn-active-color:        #191919;
    --bs-btn-disabled-bg:         #F49E55;
    --bs-btn-disabled-border-color: #F49E55;
    --bs-btn-disabled-color:      #191919;
    --bs-btn-focus-shadow-rgb:    244, 158, 85;
    font-weight: 600;
}

.btn-outline-primary {
    --bs-btn-color:               #c07534;
    --bs-btn-border-color:        #F49E55;
    --bs-btn-hover-bg:            #F49E55;
    --bs-btn-hover-border-color:  #F49E55;
    --bs-btn-hover-color:         #191919;
    --bs-btn-active-bg:           #e08840;
    --bs-btn-active-border-color: #e08840;
    --bs-btn-active-color:        #191919;
    --bs-btn-focus-shadow-rgb:    244, 158, 85;
}

/* ── Warm brown button — Customer Login and similar CTAs ─────────────────── */
.btn-kb-warm {
    --bs-btn-bg:                  #7F6F6D;
    --bs-btn-border-color:        #7F6F6D;
    --bs-btn-color:               #ffffff;
    --bs-btn-hover-bg:            #6b5c5a;
    --bs-btn-hover-border-color:  #6b5c5a;
    --bs-btn-hover-color:         #ffffff;
    --bs-btn-active-bg:           #5c4f4d;
    --bs-btn-active-border-color: #5c4f4d;
    --bs-btn-active-color:        #ffffff;
    --bs-btn-disabled-bg:         #7F6F6D;
    --bs-btn-disabled-border-color: #7F6F6D;
    --bs-btn-disabled-color:      #ffffff;
    --bs-btn-border-radius:       var(--bs-border-radius);
    --bs-btn-focus-shadow-rgb:    127, 111, 109;
    font-weight: 600;
}

/* ── Nav pills (Equipment page filter tabs) ──────────────────────────────── */
.nav-pills {
    --bs-nav-pills-link-active-bg:    #F49E55;
    --bs-nav-pills-link-active-color: #191919;
}

/* ── Form focus ring (overrides Bootstrap's hardcoded blue) ─────────────── */
.form-control:focus,
.form-select:focus {
    border-color: rgba(244, 158, 85, 0.6);
    box-shadow: 0 0 0 0.25rem rgba(244, 158, 85, 0.25);
}

/* ── Topbar: full viewport width strip ───────────────────────────────────── */
.kb-topbar {
    background-color: #3C4D4A;
    color: #F5F5F4;
    font-size: 0.8rem;
    letter-spacing: 0.01em;
    padding: 0.6rem 0;
}

.kb-topbar a {
    color: rgba(245, 245, 244, 0.85);
    text-decoration: none;
}

.kb-topbar a:hover {
    color: #F49E55;
}

/* ── Navbar wrapper: sticky, full-width white bar ────────────────────────── */
.kb-navbar-wrapper {
    background-color: #ffffff;
    border-bottom: 1px solid var(--bs-border-color);
    z-index: 1030;
}

/* ── Navbar: flat, no card shadow or radius ──────────────────────────────── */
.kb-navbar {
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 0.5rem 0;
    box-shadow: none;
}

.kb-navbar .navbar-brand {
    color: #3C4D4A;
    font-weight: 700;
    font-size: 1.55rem;
    letter-spacing: -0.02em;
}

.kb-navbar .navbar-brand .bi {
    font-size: 1.3em;
    vertical-align: -0.15em;
}

.kb-navbar .navbar-brand:hover {
    color: #F49E55;
}

.kb-navbar .nav-link {
    color: #3C4D4A;
    background-color: transparent;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: var(--bs-border-radius-sm);
    transition: color 0.15s, background-color 0.15s;
}

.kb-navbar .nav-link:hover {
    color: #F49E55;
    background-color: rgba(244, 158, 85, 0.08);
}

.kb-navbar .nav-link.active {
    color: #c07534;
    font-weight: 600;
}

/* ── Page hero banners ───────────────────────────────────────────────────── */
.kb-hero {
    background-color: #3C4D4A;
    color: #F5F5F4;
    padding: 5rem 0;
}

.kb-hero-sm {
    background-color: #3C4D4A;
    color: #F5F5F4;
    padding: 2.5rem 0;
}

.kb-hero-sm .lead {
    color: rgba(245, 245, 244, 0.80);
}

/* Bootstrap sets color:var(--bs-heading-color) on all headings, which beats
   inherited color. Override explicitly inside dark hero containers. */
.kb-hero h1, .kb-hero h2, .kb-hero h3,
.kb-hero h4, .kb-hero h5, .kb-hero h6,
.kb-hero-sm h1, .kb-hero-sm h2, .kb-hero-sm h3,
.kb-hero-sm h4, .kb-hero-sm h5, .kb-hero-sm h6 {
    color: #F5F5F4;
}

.kb-hero .display-5 {
    color: #F5F5F4;
    font-weight: 700;
}

.kb-hero .lead {
    color: rgba(245, 245, 244, 0.80);
}

/* ── Specials / feature cards ────────────────────────────────────────────── */
.kb-card-icon {
    height: 160px;
    background-color: var(--bs-tertiary-bg);
    border-bottom: 3px solid #F49E55;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: #3C4D4A;
    border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0;
}

/* ── Service list items ──────────────────────────────────────────────────── */
.kb-service-item {
    border-left: 4px solid #F49E55;
    background-color: #ffffff;
    border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
    transition: box-shadow 0.2s;
}

.kb-service-item:hover {
    box-shadow: var(--bs-box-shadow);
}

.kb-service-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(244, 158, 85, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #F49E55;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ── Equipment cards ─────────────────────────────────────────────────────── */
.kb-equipment-card .card-img-placeholder {
    height: 180px;
    background-color: #e8e5e4;
    border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #9FA9A7;
}

/* ── Contact info blocks ─────────────────────────────────────────────────── */
.kb-contact-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(244, 158, 85, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #F49E55;
    flex-shrink: 0;
}

/* ── Section accents ─────────────────────────────────────────────────────── */
.kb-section-title {
    position: relative;
    padding-bottom: 0.75rem;
    margin-bottom: 2rem;
}

.kb-section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background-color: #F49E55;
    border-radius: 2px;
}

.kb-section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.kb-footer {
    background-color: #2b3836;
    color: rgba(245, 245, 244, 0.80);
}

.kb-footer a {
    color: rgba(245, 245, 244, 0.70);
    text-decoration: none;
}

.kb-footer a:hover {
    color: #F49E55;
}

.kb-footer .kb-footer-heading {
    color: #F5F5F4;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.kb-footer-bottom {
    background-color: #1e2927;
    color: rgba(245, 245, 244, 0.50);
    font-size: 0.8rem;
}

/* ── Status / error pages ────────────────────────────────────────────────── */
.kb-status-code {
    font-size: 7rem;
    font-weight: 800;
    line-height: 1;
    color: #F49E55;
    letter-spacing: -0.05em;
}
