/**
 * Category Template Styles
 * Apple-style narrative design for B2B product category pages
 *
 * @package Astra-Child
 * @since 1.0.0
 */

/* ============================================
   TYPOGRAPHY & GLOBAL STYLES
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');



:root {
    --screen-edge: max(20px, 5vw);
    --content-max: 1200px;
    --space-xl: 120px;
}

.kg-cat-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1d1d1f;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   ASTRA CONTAINER OVERRIDE - FORCE FULL WIDTH
   ============================================ */
.kg-cat-page .site-content,
.kg-cat-page .site-content .ast-container,
.kg-cat-page .entry-content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}



.kg-cat-container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--screen-edge);
    width: 100%;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Spacing - Fixed Selector & Force Override */

/* Wrapper Constraint - Critical for keeping full-width children contained */
.kg-cat-page .kg-cat-wrapper {
    max-width: 100%;
    width: 100%;
    overflow-x: clip;
    /* Modern clean cut without scrollbar */
    display: block;
    /* Ensure it's not flex/grid causing shrink issues */
}

.kg-cat-page .kg-cat-wrapper>section {
    padding: 120px 0 !important;
    position: relative;
    margin-bottom: 20px;
    margin-top: 20px;
    background-color: #f5f5f7;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    left: auto;
    right: auto;
}

@media (max-width: 768px) {

    .kg-cat-page .kg-cat-wrapper>section {
        padding: 80px 0 !important;
    }
}

/* Section Titles */
.kg-cat-section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    color: #1d1d1f;
}

.kg-cat-section-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    font-weight: 300;
    color: #6e6e73;
    max-width: 800px;
    margin: 0 auto 3rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   HEADER OVERRIDE - Apple White
   ============================================ */
.kg-cat-page .site-header,
.kg-cat-page .ast-primary-header-bar,
.kg-cat-page #masthead,
body.kg-cat-page header#masthead {
    background-color: #fbfbfd !important;
}

/* ============================================
   HERO SECTION - Apple Style Full Width
   ============================================ */
/* ============================================
   HERO SECTION - Apple Style Full Width
   ============================================ */
.kg-cat-hero {
    position: relative;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fbfbfd;
    color: #1d1d1f;
    text-align: center;
    overflow: hidden;
}

.kg-cat-hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
    opacity: 0.1;
}

.kg-cat-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(251, 251, 253, 0.95) 0%, rgba(251, 251, 253, 0.85) 100%);
    z-index: 1;
}

.kg-cat-hero__content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 20px;
}

.kg-cat-breadcrumbs {
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.kg-cat-breadcrumbs a {
    color: #6e6e73;
    text-decoration: none;
    transition: color 0.3s;
}

.kg-cat-breadcrumbs a:hover {
    color: #C02C4A;
}

.kg-breadcrumb {
    display: inline-block;
    font-size: 14px;
    opacity: 0.2;
    margin-bottom: 140px;
    transform: translateX(-320px);
    color: #1d1d1f;
    text-decoration: none;
    transition: opacity 0.3s, color 0.3s, transform 0.3s;
}

.kg-breadcrumb:hover {
    opacity: 1;
    color: #C02C4A;
}

@media (max-width: 768px) {
    .kg-breadcrumb {
        transform: translateX(0);
        margin-bottom: 40px;
    }
}

/* ============================================
   RELATED CONTENT SECTION
   ============================================ */
.kg-cat-related {
    background: #f5f5f7;
    /* Padding handled by global section rule */
}

/* Section Wrapper */
.kg-cat-related__section {
    margin-bottom: 80px;
}

.kg-cat-related__section:last-child {
    margin-bottom: 0;
}

.kg-cat-related__section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 32px;
    color: #1d1d1f;
    text-align: left;
    /* Align with grid */
}

/* Grid Layout - Force Horizontal (Flex for true centering) */
.kg-cat-related__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.kg-cat-related-card {
    width: 336px;
    flex: 0 0 336px;
}

.kg-cat-related__title,
.kg-cat-related__section-title {
    text-align: center;
}

/* Card Styles */
.kg-cat-related-card {
    display: block;
    background: #f5f5f7;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.kg-cat-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.kg-cat-related-card__image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #e5e5e5;
}

.kg-cat-related-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.kg-cat-related-card:hover .kg-cat-related-card__image img {
    transform: scale(1.05);
}

.kg-cat-related-card__content {
    padding: 24px;
}

.kg-cat-related-card__title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1d1d1f;
    line-height: 1.4;
    text-align: center;
}

.kg-cat-related-card__excerpt {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #6e6e73;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kg-cat-hero__title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: #1d1d1f;
}

.kg-cat-hero__subtitle {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto 3rem;
    color: #6e6e73;
}



/* ============================================
   INTRO SECTION
   ============================================ */
.kg-cat-intro {
    background: #f5f5f7;
    text-align: center;
    margin-top: 20px;
}

.kg-cat-intro__answer {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 80px;
    color: #6e6e73;
}

.kg-cat-intro-summary {
    max-width: 800px;
    margin: 0 auto 4rem;
}

.kg-cat-summary-text {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #1d1d1f;
}

/* Features Grid */
.kg-cat-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.kg-cat-feature {
    padding: 2rem;
    border-radius: 18px;
    background: #f5f5f7;
    transition: transform 0.3s, box-shadow 0.3s;
}

.kg-cat-feature:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.kg-cat-feature__icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    color: rgb(192, 44, 74);
    display: inline-block;
    font-size: 48px;
}

.kg-cat-feature__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.kg-cat-feature__desc {
    font-size: 0.9375rem;
    color: #6e6e73;
}

/* Expandable Details */
.kg-cat-intro__details-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 2px solid #d2d2d7;
    border-radius: 980px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0 auto;
}

.kg-cat-intro__details-toggle:hover {
    border-color: #C02C4A;
    color: #C02C4A;
}

.kg-cat-toggle-details[aria-expanded="false"] .text-collapse,
.kg-cat-toggle-details[aria-expanded="true"] .text-expand {
    display: none;
}

.kg-cat-toggle-details .arrow {
    transition: transform 0.3s;
}

.kg-cat-toggle-details[aria-expanded="true"] .arrow {
    transform: rotate(180deg);
}

.kg-cat-intro__details-content {
    max-width: 800px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    text-align: left;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.kg-cat-intro__details-content:not([hidden]) {
    max-height: 1000px;
}

/* ============================================
   SPECIFICATIONS SECTION
   ============================================ */
.kg-cat-specs {
    background: #f5f5f7;
}

.kg-cat-specs__title,
.kg-cat-specs__subtitle {
    text-align: center;
}

.kg-cat-specs__table {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 2rem;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.kg-cat-specs__table thead {
    background: #1d1d1f;
    color: #fff;
}

.kg-cat-specs__table th {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 2px solid rgb(245, 245, 247);
    border-top: 2px solid rgb(245, 245, 247);
    border-right: 2px solid rgb(245, 245, 247);
}

.kg-cat-specs__table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 2px solid rgb(245, 245, 247);
    border-top: 2px solid rgb(245, 245, 247);
    border-right: 2px solid rgb(245, 245, 247);
}

.kg-cat-specs__table tbody tr:last-child td {
    border-bottom: none;
}

.kg-cat-specs__table tbody tr:hover {
    background: #f9f9f9;
}

.kg-cat-specs__param-name {
    font-weight: 600;
    color: #1d1d1f;
}

.kg-cat-specs__param-value {
    color: #424245;
}

.kg-cat-specs-download {
    text-align: center;
    margin: 2rem 0;
}

.kg-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 14px 28px;
    border-radius: 980px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.kg-cat-btn-primary {
    background: #C02C4A;
    color: #fff;
}

.kg-cat-btn-primary:hover {
    background: #a82540;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(192, 44, 74, 0.2);
}

.kg-cat-btn-secondary {
    background: transparent;
    color: #C02C4A;
    border: 2px solid #C02C4A;
}

.kg-cat-btn-secondary:hover {
    background: #C02C4A;
    color: #fff;
}

.kg-cat-specs-note {
    max-width: 800px;
    margin: 2rem auto 0;
    padding: 1.5rem;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    font-size: 0.9375rem;
}

/* ============================================
   FAQ SECTION - Red Card Style (User Screenshot)
   ============================================ */
.kg-cat-faq__container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

.kg-cat-faq__title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4rem;
    color: #1d1d1f;
    letter-spacing: -0.01em;
}

.kg-cat-faq__item {
    background: transparent;
    border-radius: 12px;
    margin-bottom: 24px;
    /* Distinct card separation */
    /* No consistent shadow on container, applied to children */
}

/* Question Header (The Card) */
.kg-cat-faq__question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 32px;
    /* Generous padding */
    background: #ffffff99;
    border: none;
    border-radius: 12px;
    /* All corners rounded default */
    text-align: left;
    font-size: 1.25rem;
    /* 20px */
    font-weight: 600;
    color: #1d1d1f;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.kg-cat-faq__question:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    color: #C02C4A;
    z-index: 2;
}

/* Active State Header */
.kg-cat-faq__question[aria-expanded="true"] {
    background-color: #C02C4A;
    /* Brand Red */
    background-color: var(--kg-brand-red, #C02C4A);
    color: #fff;
    border-radius: 12px 12px 0 0;
    /* Top corners only */
    box-shadow: 0 4px 12px rgba(192, 44, 74, 0.2);
}

.kg-cat-faq__question[aria-expanded="true"]:hover {
    color: #fff;
    background-color: #a82540;
}

.kg-cat-faq__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-left: 20px;
    color: #86868b;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.kg-cat-faq__question:hover .kg-cat-faq__icon {
    color: #C02C4A;
}

/* Active Icon */
.kg-cat-faq__question[aria-expanded="true"] .kg-cat-faq__icon {
    transform: rotate(180deg);
    color: #fff;
    /* White icon on red bg */
}

.kg-cat-faq__question[aria-expanded="true"]:hover .kg-cat-faq__icon {
    color: #fff;
}

/* Answer Body */
.kg-cat-faq__answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    background: #ffffff99;
    border-radius: 0 0 12px 12px;
    /* Bottom corners only */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transform-origin: top;
    transition:
        max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.4s ease;
}

/* Expanded State */
.kg-cat-faq__question[aria-expanded="true"]+.kg-cat-faq__answer {
    max-height: 800px;
    opacity: 1;
}

.kg-cat-faq__answer-content {
    padding: 32px;
    /* Match header padding */
    color: #424245;
    line-height: 1.7;
    font-size: 1.0625rem;
    /* 17px */
}

.kg-cat-faq__answer-content p {
    margin: 0;
    margin-bottom: 1rem;
}

.kg-cat-faq__answer-content p:last-child {
    margin-bottom: 0;
}

/* ============================================
   PRODUCT GRID SECTION
   ============================================ */
.kg-cat-products__title,
.kg-cat-products__subtitle {
    text-align: center;
}


/* Empty State */
.kg-cat-products__empty {
    text-align: center;
    color: #86868b;
    font-size: 1.125rem;
    margin: 60px 0;
}


.kg-cat-products__group {
    max-width: 1200px;
    margin: 0 auto 60px;
}

.kg-cat-products__group-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5rem;
    font-weight: 600;
}

.kg-cat-products__group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    justify-content: center;
}

.kg-cat-product-card {
    display: block;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.kg-cat-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.kg-cat-product-card__image {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f5f5f7;
}

.kg-cat-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.kg-cat-product-card:hover .kg-cat-product-card__image img {
    transform: scale(1.05);
}

.kg-cat-product-card__content {
    padding: 1.5rem;
}


/* ============================================
   APPLE STYLE CAROUSEL (Ported from Systems)
   ============================================ */

/* Scroll Wrapper */
.kg-cat-carousel-wrapper {
    position: relative;
    width: 100%;
    /* Full width of container */
    margin: 40px 0;
    isolation: isolate;
}

/* Scroll Container */
.kg-cat-carousel-container {
    width: 100%;
    /* Start padding aligns 1st card with content grid */
    padding-left: max(var(--screen-edge, 20px), calc((100vw - 1200px) / 2));
    padding-right: var(--screen-edge, 20px);

    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */

    /* Scroll Snap */
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

    /* Hide Scrollbar */
    padding-bottom: 40px;
    /* Space for shadow */
    margin-bottom: -40px;
    /* Pull back layout space */
}

.kg-cat-carousel-container::-webkit-scrollbar {
    display: none;
}

/* Strip Track */
.kg-cat-carousel-strip {
    display: flex;
    gap: 24px;
    padding-bottom: 40px;
    /* Space for shadow */
}

.kg-cat-carousel-spacer {
    flex: 0 0 15vw;
    /* Fake spacer for right edge scroll */
    pointer-events: none;
    scroll-snap-align: none;
}

/* Card: 4:3 Immersive */
.kg-cat-system-card {
    flex: 0 0 auto;
    width: 52vw;
    /* Desktop default */
    aspect-ratio: 4/3;

    display: block;
    text-decoration: none;
    background: #000;
    border-radius: 16px;
    position: relative;
    overflow: hidden;

    scroll-snap-align: center;

    /* High Lift Shadow */
    box-shadow:
        0 20px 40px -4px rgba(0, 0, 0, 0.15),
        0 8px 16px -4px rgba(0, 0, 0, 0.1);

    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.kg-cat-system-card:hover {
    transform: translateY(-8px);
}

/* Visual Layer */
.kg-cat-card-visual {
    width: 100%;
    height: 100%;
    position: relative;
}

.kg-cat-card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.kg-cat-system-card:hover .kg-cat-card-visual img {
    transform: scale(1.03);
}

/* Overlay Gradient */
.kg-cat-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 60%);
    pointer-events: none;
}

/* Content Layer */
.kg-cat-card-content {
    position: absolute;
    bottom: 48px;
    left: 48px;
    right: 48px;
    z-index: 2;
    color: #fff;
    text-align: left;
}

.kg-cat-card-title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    /* 40px base */
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #fff;
    letter-spacing: -0.01em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.kg-cat-card-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 16px 0;
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.kg-cat-card-cta {
    display: inline-block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.kg-cat-system-card:hover .kg-cat-card-cta {
    opacity: 1;
    transform: translateX(0);
}

/* Navigation Buttons */
.kg-cat-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.25);
    /* Faint Glass */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(29, 29, 31, 0.5);
    /* Faint Black */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.kg-cat-nav-btn svg {
    width: 42px;
    height: 42px;
}

.kg-cat-nav-btn.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.kg-cat-nav-btn:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-50%) scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
    color: rgba(29, 29, 31, 0.8);
    outline: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.kg-cat-nav-btn:active,
.kg-cat-nav-btn:focus {
    background: rgba(255, 255, 255, 0.7) !important;
    color: #1d1d1f !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    outline: none !important;
    transform: translateY(-50%) scale(0.95);
}

.kg-cat-nav-prev {
    left: var(--screen-edge, 20px);
}

.kg-cat-nav-next {
    right: var(--screen-edge, 20px);
}


/* Responsive */
@media (max-width: 768px) {
    .kg-cat-system-card {
        width: 85vw;
        /* Almost full width mobile */
        aspect-ratio: 1/1;
        /* Square on mobile */
    }

    .kg-cat-card-content {
        bottom: 24px;
        left: 24px;
        right: 24px;
    }

    .kg-cat-nav-btn {
        display: none;
        /* Hide nav buttons on mobile touch */
    }

    .kg-cat-card-cta {
        opacity: 1;
        transform: none;
        /* Always visible on mobile */
    }
}


/* ============================================
   CTA & VALUE PROOF SECTIONS
   ============================================ */
/* ============================================
   CTA & VALUE PROOF SECTIONS
   ============================================ */
.kg-cat-cta {
    background: #fff;
    color: #1d1d1f;
    text-align: center;
    border-top: none;
    /* Subtle separation */
}

.kg-cat-cta .kg-cat-cta__title {
    color: #1d1d1f;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.kg-cat-cta .kg-cat-cta__subtitle {
    color: #424245;
    /* Slightly lighter gray */
    font-size: 1.25rem;
    margin-bottom: 48px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.kg-cat-cta__buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 64px;
}

/* Primary Button: Solid Black (Apple Action) */
.kg-cat-cta__btn--primary {
    background: #1d1d1f;
    color: #fff;
    border: 1px solid #1d1d1f;
    padding: 14px 32px;
    border-radius: 980px;
    font-size: 1.0625rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.kg-cat-cta__btn--primary:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Secondary Button: Outlined Black */
.kg-cat-cta__btn--secondary {
    background: transparent;
    color: #1d1d1f;
    border: 1px solid #86868b;
    padding: 14px 32px;
    border-radius: 980px;
    font-size: 1.0625rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.kg-cat-cta__btn--secondary:hover {
    border-color: #1d1d1f;
    background: #f5f5f7;
}

/* Trust Signals */
.kg-cat-cta__signals {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    color: #6e6e73;
    font-size: 0.9375rem;
}

.kg-cat-cta__signal {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kg-cat-cta__signal-icon {
    width: 20px;
    height: 20px;
    color: #1d1d1f;
    /* Icons slightly darker */
}

.kg-cat-cta__explore {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e5e5e7;
}

.kg-cat-cta__explore-link {
    font-size: 1.125rem;
    font-weight: 500;
    color: #6e6e73;
    text-decoration: none;
    transition: all 0.3s ease;
}

.kg-cat-cta__explore-link:hover {
    color: #C02C4A;
    transform: translateX(4px);
    display: inline-block;
}

.kg-cat-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item strong {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: #0071e3;
    margin-bottom: 0.5rem;
}

.stat-item span {
    font-size: 1.125rem;
    color: #6e6e73;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .kg-cat-features-grid {
        grid-template-columns: 1fr;
    }

    .kg-cat-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .kg-cat-hero-title {
        font-size: 2.5rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
.kg-cat-btn:focus-visible,
.kg-cat-faq-question:focus-visible,
.kg-cat-toggle-details:focus-visible {
    outline: 3px solid #0071e3;
    outline-offset: 3px;
}

/* ============================================
   PARENT CATEGORY TEMPLATE STYLES
   (Migrated from inline)
   ============================================ */

/* Hero Fullscreen */
.kg-cat-hero-fullscreen {
    position: relative;
    height: 90vh;
    /* Apple B2B standard */
    min-height: 600px;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #1d1d1f;
    overflow: hidden;
    background-color: #fff;
}

.kg-cat-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.kg-cat-img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kg-cat-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.3);
    /* Slight lighten */
}

.kg-cat-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}

.kg-cat-hero-title {
    font-size: 4rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: #1d1d1f;
}

.kg-cat-hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.9;
    color: #1d1d1f;
}

.kg-cat-hero-scroll-hint {
    position: absolute;
    bottom: 40px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.7;
    animation: kg-cat-bounce 2s infinite;
    color: #1d1d1f;
}

.kg-cat-scroll-text {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@keyframes kg-cat-bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-5px);
    }

    60% {
        transform: translateY(-3px);
    }
}

/* Section Spacing */
.kg-cat-section-systems {
    /* Padding handled by global section rule */
    background: #fff;
}

.kg-cat-section-header {
    margin-bottom: 60px;
}

/* Capabilities Grid */
.kg-cat-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.kg-cat-cap-card {
    padding: 30px;
    background: #f9f9f9;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.kg-cat-cap-card:hover {
    transform: translateY(-5px);
}

.kg-cat-cap-icon {
    font-size: 2rem;
    font-weight: 700;
    color: #C02C4A;
    /* Brand Red */
    margin-bottom: 20px;
    opacity: 0.2;
}

.kg-cat-cap-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.kg-cat-cap-desc {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}

/* Scroll Hint - Position Bottom Center */
.kg-cat-hero__scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.8;
    animation: bounce 2s infinite;
    z-index: 10;
}

@keyframes bounce {

    0%,
    100% {
        transform: translate(-50%, 0);
    }

    50% {
        transform: translate(-50%, -10px);
    }
}

.kg-cat-products__view-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 40px auto;
    padding: 12px 24px;
    width: fit-content;
    background: #f5f5f7;
    border-radius: 980px;
    color: #1d1d1f;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.kg-cat-products__view-toggle-btn:hover {
    background: #e8e8ed;
    transform: translateY(-2px);
}


/* Manufacturing Split */
.kg-cat-section-manufacturing {
    padding-top: 120px;
    padding-bottom: 120px;
    margin-bottom: 20px;
    margin-top: 20px;
    background: #f1f1f1;
}

.kg-cat-split-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 60px;
}

.kg-cat-col-text,
.kg-cat-col-media {
    flex: 1 1 400px;
}

.kg-cat-man-content h3 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.kg-cat-label-small {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
    margin-bottom: 20px;
}

.kg-cat-col-media img {
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Scenarios */
.kg-cat-section-scenarios {
    padding: 80px 0;
}

.kg-cat-scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.kg-cat-scene-card {
    position: relative;
    aspect-ratio: 16/9;
    background: #eee;
    border-radius: 8px;
    overflow: hidden;
}

.kg-cat-scene-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.kg-cat-scene-card:hover img {
    transform: scale(1.05);
}

.kg-cat-scene-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.kg-cat-scene-title {
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Personas */
.kg-cat-section-personas {
    padding: 80px 0;
    background: #fff;
    border-top: 1px solid #eee;
}

.kg-cat-personas-flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.kg-cat-persona-item {
    flex: 1 1 250px;
    max-width: 350px;
    text-align: center;
    padding: 0 20px;
}

.kg-cat-persona-role {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

.kg-cat-persona-desc {
    font-size: 0.95rem;
    color: #666;
}

/* Subcat Links */
.kg-cat-section-subcat-grid {
    padding: 60px 0;
    background: #fafafa;
}

.kg-cat-grid-header {
    margin-bottom: 30px;
    font-size: 1.2rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.kg-cat-subcat-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.kg-cat-subcat-link-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.2s;
}

.kg-cat-subcat-link-item:hover {
    border-color: #999;
    transform: translateX(5px);
}

/* CTA */
.kg-cat-section-cta {
    padding: 100px 20px;
    text-align: center;
    background: #1d1d1f;
    color: #fff;
}

.kg-cat-cta-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #1d1d1f;
}

.kg-cat-btn-primary {
    display: inline-block;
    padding: 15px 40px;
    background: #C02C4A;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.kg-cat-btn-primary:hover {
    background: #a0223a;
}

/* ============================================
   APPLICATIONS - Zigzag Layout (Screenshot 1)
   ============================================ */
.kg-cat-applications {
    padding: 120px 0;
}

.kg-cat-applications__title {
    text-align: center;
}

.kg-cat-applications__subtitle {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 80px;
    color: #6e6e73;
}

.kg-cat-applications__grid {
    display: flex;
    flex-direction: column;
    gap: 120px;
    max-width: 1200px;
    margin: 0 auto;
}

.kg-cat-application {
    display: flex;
    align-items: center;
    gap: 80px;
}

/* Reverse layout for even items (Zigzag) */
.kg-cat-application--reverse {
    flex-direction: row-reverse;
}

.kg-cat-application__image {
    flex: 1;
    background: #f5f5f7;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.kg-cat-application__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.kg-cat-application:hover .kg-cat-application__image img {
    transform: scale(1.05);
}

.kg-cat-application__content {
    flex: 1;
    text-align: left;
    /* Content aligns left relative to its block */
}

.kg-cat-application__title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1d1d1f;
}

.kg-cat-application__desc {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #6e6e73;
    margin-bottom: 30px;
}

.kg-cat-application__tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.kg-cat-application__tag {
    background: #e8e8ed;
    color: #1d1d1f;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

@media (max-width: 992px) {
    .kg-cat-application {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .kg-cat-application--reverse {
        flex-direction: column;
    }

    .kg-cat-application__content {
        text-align: center;
    }

    .kg-cat-application__tags {
        justify-content: center;
    }
}


/* ============================================
   VALUE PROOF - Dark Mode (Screenshot 2)
   ============================================ */
.kg-cat-value-proof {
    background-color: #1d1d1f !important;
    color: #f5f5f7;
    text-align: center;
}

.kg-cat-value-proof__title {
    color: #f5f5f7;
    margin-bottom: 60px;
    text-align: center;
    font-size: 3rem;
}

.kg-cat-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 80px;
    margin-bottom: 100px;
}

.kg-cat-stat {
    text-align: center;
}

.kg-cat-stat__number {
    font-size: 5rem;
    font-weight: 700;
    color: #C02C4A;
    /* Brand Red */
    line-height: 1;
    margin-bottom: 10px;
    display: block;
}

.kg-cat-stat__suffix {
    font-size: 3rem;
    color: #fff;
    vertical-align: top;
    margin-left: 5px;
}

.kg-cat-stat__label {
    font-size: 1.1rem;
    color: #a1a1a6;
    margin-top: 10px;
}

.kg-cat-certifications__title {
    text-align: center;
    color: #f5f5f7;
    margin-bottom: 60px;
    font-size: 2rem;
    font-weight: 600;
}

.kg-cat-certifications__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.kg-cat-cert {
    background: #2d2d2f;
    padding: 60px 40px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.kg-cat-cert:hover {
    transform: translateY(-5px);
    background: #3a3a3c;
}

.kg-cat-cert__placeholder {
    color: #6e6e73;
}

.kg-cat-cert__placeholder svg {
    width: 64px;
    height: 64px;
    opacity: 0.5;
}

.kg-cat-cert__name {
    font-size: 1rem;
    color: #f5f5f7;
    font-weight: 500;
}

/* ============================================
   HEADER Z-INDEX FIX
   ============================================ */
.kg-cat-page .site-header,
.kg-cat-page .ast-primary-header-bar,
.kg-cat-page #masthead {
    position: relative;
    z-index: 9999 !important;
}

/* Ensure body doesn't clip absolute menus if possible */
.kg-cat-page {
    overflow-x: visible !important;
    /* Allow menu to overflow if needed, but watch for scrollbar */
}