/* ==========================================================================
   MAXXMA Knowledge Hub — Pillar Page Stylesheet
   Brand: Dark/Modern Pro-tier UX
   ========================================================================== */

/* ── CSS Variables ─────────────────────────────────────────────────────── */
:root {
    --kh-orange: #d99435;
    --kh-yellow: #e9c34c;
    --kh-dark-yellow: #f4bb1e;
    --kh-text-green: #89802f;
    --kh-blue: #48819f;
    --kh-gray: #7f8690;
    --kh-dark: #1e293b;
    --kh-white: #ffffff;
    --kh-off-white: #f8f9fa;
    --kh-radius: 12px;
    --kh-radius-sm: 8px;
    --kh-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --kh-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
    --kh-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --kh-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --kh-hero-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #1a1a2e 100%);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #0f1117;
}

/* ── Container ─────────────────────────────────────────────────────────── */
.kh-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* ═════════════════════════════════════════════════════════════════════════
   HERO SECTION
   ═════════════════════════════════════════════════════════════════════════ */
.kh-hero {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--kh-hero-gradient);
    overflow: hidden;
    padding: 100px 24px 80px;
}

.kh-hero__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(217, 148, 53, 0.13) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(72, 129, 159, 0.10) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(233, 195, 76, 0.06) 0%, transparent 60%);
    z-index: 0;
}

/* Subtle dot pattern overlay */
.kh-hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='20' r='1' fill='white'/%3E%3C/svg%3E");
    background-size: 40px 40px;
}

.kh-hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 760px;
    width: 100%;
}

.kh-hero__badge {
    display: inline-block;
    background: rgba(217, 148, 53, 0.18);
    border: 1px solid rgba(217, 148, 53, 0.3);
    color: var(--kh-yellow);
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 6px 20px;
    border-radius: 9999px;
    margin-bottom: 24px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.kh-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--kh-white);
    line-height: 1.2;
    margin: 0 0 20px;
    letter-spacing: -0.015em;
}

.kh-hero__highlight {
    background: linear-gradient(135deg, var(--kh-orange), var(--kh-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.kh-hero__sub {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.75;
    margin: 0 0 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Search Bar ────────────────────────────────────────────────────────── */
.kh-search {
    max-width: 560px;
    margin: 0 auto;
    position: relative;
}

.kh-search__wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    padding: 6px 6px 6px 20px;
    transition: border-color var(--kh-transition), box-shadow var(--kh-transition);
    backdrop-filter: blur(8px);
}

.kh-search__wrapper:focus-within {
    border-color: var(--kh-orange);
    box-shadow: 0 0 0 3px rgba(217, 148, 53, 0.15);
}

.kh-search__icon {
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.kh-search__input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--kh-white);
    font-size: 0.9375rem;
    padding: 10px 12px;
    outline: none;
    min-width: 0;
}

.kh-search__input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.kh-search__btn {
    background: linear-gradient(135deg, var(--kh-orange), #c17f25);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 9999px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--kh-transition), box-shadow var(--kh-transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.kh-search__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(217, 148, 53, 0.35);
}

/* ── Search Suggestions ────────────────────────────────────────────────── */
.kh-search__suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--kh-radius);
    padding: 8px;
    z-index: 20;
    box-shadow: var(--kh-shadow-lg);
}

.kh-search__suggestion {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    padding: 10px 14px;
    text-align: left;
    cursor: pointer;
    border-radius: var(--kh-radius-sm);
    transition: background var(--kh-transition), color var(--kh-transition);
}

.kh-search__suggestion:hover {
    background: rgba(217, 148, 53, 0.12);
    color: var(--kh-yellow);
}

/* ═════════════════════════════════════════════════════════════════════════
   SECTION SHARED STYLES
   ═════════════════════════════════════════════════════════════════════════ */
.kh-section {
    padding: 80px 0;
}

.kh-section--alt {
    background: #11151d;
}

.kh-section__label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--kh-orange);
    margin-bottom: 8px;
}

.kh-section__title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--kh-white);
    line-height: 1.3;
    margin: 0 0 12px;
}

.kh-section__desc {
    font-size: 1rem;
    color: #94a3b8;
    line-height: 1.7;
    max-width: 600px;
    margin-bottom: 48px;
}

.kh-section__header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 48px;
}

/* ═════════════════════════════════════════════════════════════════════════
   TOPIC CLUSTER CARDS
   ═════════════════════════════════════════════════════════════════════════ */
.kh-topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.kh-topic-card {
    background: #1a1f2b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--kh-radius);
    padding: 32px 28px;
    transition: transform var(--kh-transition), box-shadow var(--kh-transition), border-color var(--kh-transition);
    display: flex;
    flex-direction: column;
}

.kh-topic-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--kh-shadow-lg);
    border-color: rgba(217, 148, 53, 0.25);
}

.kh-topic-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: transform var(--kh-transition);
}

.kh-topic-card:hover .kh-topic-card__icon {
    transform: scale(1.08);
}

.kh-topic-card__icon--auto {
    background: linear-gradient(135deg, rgba(72, 129, 159, 0.2), rgba(72, 129, 159, 0.1));
    color: #6db3d4;
}

.kh-topic-card__icon--building {
    background: linear-gradient(135deg, rgba(217, 148, 53, 0.2), rgba(217, 148, 53, 0.08));
    color: var(--kh-orange);
}

.kh-topic-card__icon--tech {
    background: linear-gradient(135deg, rgba(233, 195, 76, 0.2), rgba(233, 195, 76, 0.08));
    color: var(--kh-yellow);
}

.kh-topic-card__icon--care {
    background: linear-gradient(135deg, rgba(137, 128, 47, 0.2), rgba(137, 128, 47, 0.08));
    color: #b3aa4d;
}

.kh-topic-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--kh-white);
    margin: 0 0 8px;
    line-height: 1.4;
}

.kh-topic-card p {
    font-size: 0.9375rem;
    color: #94a3b8;
    line-height: 1.65;
    margin: 0 0 24px;
    flex: 1;
}

.kh-topic-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--kh-yellow);
    text-decoration: none;
    transition: gap var(--kh-transition), color var(--kh-transition);
}

.kh-topic-card__link:hover {
    gap: 10px;
    color: var(--kh-orange);
}

/* ═════════════════════════════════════════════════════════════════════════
   ARTICLES GRID
   ═════════════════════════════════════════════════════════════════════════ */
.kh-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.kh-article-card {
    background: #1a1f2b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--kh-radius);
    overflow: hidden;
    transition: transform var(--kh-transition), box-shadow var(--kh-transition), border-color var(--kh-transition);
    display: flex;
    flex-direction: column;
}

.kh-article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--kh-shadow-md);
    border-color: rgba(217, 148, 53, 0.2);
}

.kh-article-card__thumb {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: #141820;
}

.kh-article-card__thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #1a1f2b 50%, #162040 100%);
    color: rgba(255, 255, 255, 0.15);
}

.kh-article-card__thumb-placeholder--auto {
    background: linear-gradient(135deg, rgba(72, 129, 159, 0.25), rgba(72, 129, 159, 0.1));
}

.kh-article-card__thumb-placeholder--building {
    background: linear-gradient(135deg, rgba(217, 148, 53, 0.25), rgba(217, 148, 53, 0.1));
}

.kh-article-card__thumb-placeholder--tech {
    background: linear-gradient(135deg, rgba(233, 195, 76, 0.25), rgba(233, 195, 76, 0.1));
}

.kh-article-card__thumb-placeholder--care {
    background: linear-gradient(135deg, rgba(137, 128, 47, 0.25), rgba(137, 128, 47, 0.1));
}

.kh-article-card__body {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.kh-article-card__tag {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--kh-orange);
    margin-bottom: 10px;
}

.kh-article-card__title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--kh-white);
    line-height: 1.45;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kh-article-card__excerpt {
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.6;
    margin: 0 0 18px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kh-article-card__readmore {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--kh-yellow);
    text-decoration: none;
    transition: gap var(--kh-transition), color var(--kh-transition);
}

.kh-article-card__readmore:hover {
    gap: 8px;
    color: var(--kh-orange);
}

/* ═════════════════════════════════════════════════════════════════════════
   E-E-A-T EXPERTISE BAR
   ═════════════════════════════════════════════════════════════════════════ */
.kh-expertise {
    background: linear-gradient(135deg, #1a1f2b 0%, #141820 100%);
    border-top: 1px solid rgba(217, 148, 53, 0.15);
    border-bottom: 1px solid rgba(217, 148, 53, 0.15);
    padding: 32px 0;
}

.kh-expertise__inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 24px;
}

.kh-expertise__icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(217, 148, 53, 0.2), rgba(217, 148, 53, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--kh-yellow);
}

.kh-expertise__text h3 {
    font-size: 1rem;
    color: var(--kh-white);
    margin: 0 0 4px;
    font-weight: 600;
}

.kh-expertise__text h3 strong {
    color: var(--kh-yellow);
}

.kh-expertise__text p {
    font-size: 0.8125rem;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0;
}

/* ═════════════════════════════════════════════════════════════════════════
   LEAD GEN / CTA SECTION
   ═════════════════════════════════════════════════════════════════════════ */
.kh-cta {
    padding: 80px 0;
}

.kh-cta__card {
    background: linear-gradient(135deg, #1a1f2b 0%, #162040 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 48px 48px 48px 56px;
    display: flex;
    align-items: center;
    gap: 40px;
    overflow: hidden;
    position: relative;
}

.kh-cta__card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(217, 148, 53, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.kh-cta__content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.kh-cta__content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--kh-white);
    margin: 0 0 12px;
    line-height: 1.4;
}

.kh-cta__content p {
    font-size: 1rem;
    color: #94a3b8;
    line-height: 1.7;
    margin: 0 0 28px;
    max-width: 500px;
}

.kh-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.kh-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 13px 28px;
    border-radius: 9999px;
    text-decoration: none;
    transition: transform var(--kh-transition), box-shadow var(--kh-transition);
}

.kh-cta__btn:hover {
    transform: translateY(-2px);
}

.kh-cta__btn--primary {
    background: linear-gradient(135deg, var(--kh-orange), #c17f25);
    color: white;
    box-shadow: 0 4px 20px rgba(217, 148, 53, 0.3);
}

.kh-cta__btn--primary:hover {
    box-shadow: 0 8px 28px rgba(217, 148, 53, 0.4);
}

.kh-cta__btn--line {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--kh-white);
}

.kh-cta__btn--line:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.kh-cta__visual {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.kh-cta__visual-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.25);
}

/* ═════════════════════════════════════════════════════════════════════════
   BACK TO TOP (override for dark theme)
   ═════════════════════════════════════════════════════════════════════════ */
#back-to-top {
    background: rgba(30, 41, 59, 0.85) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
}

/* ═════════════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═════════════════════════════════════════════════════════════════════════ */

/* Tablet: 2-col articles */
@media (max-width: 1024px) {
    .kh-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .kh-cta__card {
        flex-direction: column;
        text-align: center;
        padding: 40px 32px;
    }

    .kh-cta__content p {
        margin-left: auto;
        margin-right: auto;
    }

    .kh-cta__actions {
        justify-content: center;
    }

    .kh-cta__visual {
        display: none;
    }
}

/* Mobile: 1-col articles, stacked layout */
@media (max-width: 640px) {
    .kh-hero {
        min-height: 440px;
        padding: 80px 20px 56px;
    }

    .kh-hero h1 {
        font-size: 1.75rem;
    }

    .kh-hero__sub {
        font-size: 0.9375rem;
        margin-bottom: 32px;
    }

    .kh-search__wrapper {
        padding: 5px 5px 5px 14px;
    }

    .kh-search__input {
        font-size: 0.8125rem;
        padding: 8px 8px;
    }

    .kh-search__btn {
        padding: 8px 16px;
        font-size: 0.8125rem;
    }

    .kh-section {
        padding: 56px 0;
    }

    .kh-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .kh-topic-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .kh-articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .kh-topic-card {
        padding: 24px 20px;
    }

    .kh-article-card__body {
        padding: 16px 18px 20px;
    }

    .kh-expertise__inner {
        flex-direction: column;
        text-align: center;
    }

    .kh-cta__card {
        padding: 32px 20px;
        border-radius: 12px;
    }

    .kh-cta__content h3 {
        font-size: 1.25rem;
    }

    .kh-cta__actions {
        flex-direction: column;
        align-items: center;
    }

    .kh-cta__btn {
        width: 100%;
        justify-content: center;
    }
}

/* Very small devices */
@media (max-width: 380px) {
    .kh-hero {
        padding: 64px 12px 40px;
    }

    .kh-hero h1 {
        font-size: 1.5rem;
    }

    .kh-search__btn span {
        display: none;
    }
}