/* ============================================================
   KBix Color Palette (from kbixsolutionsllc.com gradient)
   #ff8c59  warm orange
   #ffb37f  peach
   #a3bf5f  sage green
   #7ca63a  medium green
   #527f32  forest green
   ============================================================ */

:root {
    --kbix-orange:       #ff8c59;
    --kbix-peach:        #ffb37f;
    --kbix-sage:         #a3bf5f;
    --kbix-green:        #7ca63a;
    --kbix-forest:       #527f32;
    --kbix-dark:         #1e2a1a;
    --kbix-light-bg:     #f7f9f4;
    --kbix-card-bg:      #ffffff;
    --kbix-border:       #e0e8d8;
    --kbix-text:         #2c3a28;
    --kbix-text-muted:   #607850;
    --kbix-gradient:     linear-gradient(90deg, #ff8c59, #ffb37f 25%, #a3bf5f 50%, #7ca63a 75%, #527f32);
}

/* ============================================================
   Base
   ============================================================ */

html, body {
    min-height: 100%;
    font-size: 15px;
    background-color: var(--kbix-light-bg);
    color: var(--kbix-text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ============================================================
   Header — Brand Bar
   ============================================================ */

.site-header {
    background-color: #ffffff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    z-index: 1000;
}

.header-brand-bar {
    background: var(--kbix-dark);
    border-bottom: 3px solid transparent;
    border-image: var(--kbix-gradient) 1;
}

.logo-link {
    color: #ffffff;
}

.logo-link:hover {
    color: var(--kbix-peach);
}

.kbix-logo {
    height: 110px;
    width: auto;
    object-fit: contain;
    background: #ffffff;
    border-radius: 8px;
    padding: 8px 16px;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    padding-right: 2rem;
    white-space: nowrap;
}

.logo-title {
    font-size: 3.4rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.logo-subtitle {
    font-size: 1.95rem;
    font-weight: 400;
    color: var(--kbix-sage);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.header-tagline {
    display: flex;
    flex-direction: column;
}

.tagline-text {
    display: block;
    color: #b0c4a8;
    font-size: 2.1rem;
    font-style: italic;
    line-height: 1.2;
}

/* ============================================================
   Header — Search Bar
   ============================================================ */

.header-search-bar {
    background-color: #ffffff;
}

.search-wrapper {
    max-width: 860px;
}

.search-input-group {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(82,127,50,0.12);
    border: 1.5px solid var(--kbix-border);
}

.search-icon-wrap {
    background: var(--kbix-forest);
    border: none;
    color: #ffffff;
    font-size: 1rem;
    padding: 0 14px;
}

.search-input {
    border: none;
    font-size: 0.95rem;
    padding: 10px 14px;
    color: var(--kbix-text);
    background: #ffffff;
}

.search-input:focus {
    box-shadow: none;
    border-color: transparent;
    outline: none;
}

.search-clear-btn {
    background: #f0f0f0;
    border: none;
    border-left: 1px solid var(--kbix-border);
    color: #888;
    padding: 0 14px;
    border-radius: 0;
    transition: background 0.15s, color 0.15s;
}

.search-clear-btn:hover {
    background: var(--kbix-orange);
    color: #ffffff;
}

.search-count {
    font-size: 0.8rem;
    color: var(--kbix-text-muted);
    min-height: 1.2em;
}

/* ============================================================
   Tip Cards
   ============================================================ */

#tipContainer {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tip-card {
    background: var(--kbix-card-bg);
    border: 1px solid var(--kbix-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s, transform 0.2s;
    border-left: 5px solid transparent;
    border-image: var(--kbix-gradient) 1;
    border-image-slice: 0 0 0 5;
}

.tip-card:hover {
    box-shadow: 0 6px 24px rgba(82,127,50,0.14);
    transform: translateY(-2px);
}

.tip-card.hidden {
    display: none;
}

.tip-card-inner {
    display: flex;
    flex-direction: row;
    min-height: 220px;
}

/* Image column */
.tip-image-col {
    flex: 0 0 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--kbix-light-bg);
    border-right: 1px solid var(--kbix-border);
    padding: 1.25rem 1rem;
    gap: 1rem;
}

.tip-image {
    width: 200px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--kbix-border);
    background: #e8ede4;
}

/* Keyword badges */
.tip-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.keyword-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--kbix-orange), var(--kbix-peach));
    color: #ffffff;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.keyword-badge.highlight {
    background: linear-gradient(135deg, var(--kbix-green), var(--kbix-forest));
    box-shadow: 0 0 0 2px var(--kbix-sage);
}

/* Content column */
.tip-content-col {
    flex: 1 1 auto;
    padding: 1.5rem 2rem;
}

.tip-number {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--kbix-orange);
    margin-bottom: 0.3rem;
}

.tip-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--kbix-forest);
    margin-bottom: 0.9rem;
    line-height: 1.25;
}

.tip-paragraph {
    font-size: 0.93rem;
    line-height: 1.7;
    color: var(--kbix-text);
    margin-bottom: 0.75rem;
}

.tip-paragraph:last-child {
    margin-bottom: 0;
}

/* ============================================================
   No Results Message
   ============================================================ */

.no-results-message {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--kbix-text-muted);
}

.no-results-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.no-results-message h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--kbix-forest);
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
    background: var(--kbix-dark);
    border-top: 3px solid transparent;
    border-image: var(--kbix-gradient) 1;
    color: #8fa87e;
}

.footer-copy {
    font-size: 0.82rem;
    color: #9dbf88;
}

.footer-note {
    font-size: 0.75rem;
    color: #6a8060;
    font-style: italic;
}

/* ============================================================
   Search highlight on text
   ============================================================ */

mark.search-highlight {
    background: #fff3b0;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

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

/* Medium — tablet landscape (768px–991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .kbix-logo {
        height: 75px;
        padding: 6px 12px;
    }

    .logo-title {
        font-size: 2.2rem;
    }

    .logo-subtitle {
        font-size: 1.25rem;
    }

    .tagline-text {
        font-size: 1.4rem;
    }
}

/* ============================================================
   Floating Contact Widget
   ============================================================ */

.contact-float {
    position: fixed;
    bottom: 1.75rem;
    right: 1.75rem;
    width: 280px;
    background: var(--kbix-dark);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
    border: 1.5px solid var(--kbix-forest);
    z-index: 2000;
    overflow: hidden;
    animation: contact-float-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes contact-float-in {
    from { opacity: 0; transform: translateY(30px) scale(0.92); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

.contact-float-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1rem;
    background: linear-gradient(90deg, var(--kbix-forest), var(--kbix-green));
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: default;
}

.contact-float-toggle {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #ffffff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}

.contact-float-toggle:hover {
    background: rgba(255,255,255,0.3);
}

.contact-float-body {
    padding: 1rem 1.1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.contact-cta-text {
    margin: 0;
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--kbix-peach);
    line-height: 1.3;
}

.contact-email-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--kbix-sage);
    font-size: 0.8rem;
    text-decoration: none;
    word-break: break-all;
    transition: color 0.15s;
}

.contact-email-link i {
    color: var(--kbix-orange);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.contact-email-link:hover {
    color: #ffffff;
}

.contact-service-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #8fa87e;
    font-size: 0.8rem;
}

.contact-service-line i {
    color: var(--kbix-green);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.contact-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    padding: 0.55rem 1rem;
    background: linear-gradient(90deg, var(--kbix-orange), var(--kbix-peach));
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: filter 0.15s, transform 0.15s;
    box-shadow: 0 3px 10px rgba(255,140,89,0.35);
}

.contact-cta-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    color: #ffffff;
}

/* ============================================================
   Small — tablet portrait and mobile (< 768px) */
@media (max-width: 767px) {
    .kbix-logo {
        height: 60px;
        padding: 5px 10px;
    }

    .logo-text {
        white-space: normal;
        padding-right: 0.5rem;
    }

    .logo-title {
        font-size: 1.7rem;
    }

    .logo-subtitle {
        font-size: 1rem;
    }

    /* Tip cards stack vertically */
    .tip-card-inner {
        flex-direction: column;
    }

    .tip-image-col {
        flex: 0 0 auto;
        border-right: none;
        border-bottom: 1px solid var(--kbix-border);
        padding: 1rem;
    }

    .tip-image {
        width: 100%;
        height: 180px;
    }

    .tip-content-col {
        padding: 1.25rem 1.25rem;
    }

    .contact-float {
        width: calc(100vw - 2rem);
        right: 1rem;
        bottom: 1rem;
    }
}
