/* Guardrails Index Page - Earthly Lunar */
/* Specific styles for /lunar/guardrails/ (main index only) */

/* ========================================
   TECH CLOUD BACKGROUND (index only)
   ======================================== */
.tech-cloud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.tech-icon {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    opacity: 0.35;
    transition: opacity 0.3s ease;
}

.tech-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1) opacity(0.7);
}

.tech-icon .placeholder-icon {
    font-size: 18px;
    color: #fff;
    opacity: 0.5;
}

/* Position and size each icon in the cloud */
/* Layout: Left edge (2-10%), Right edge (2-10%), Top center band for overflow */
/* Icons stay clear of center text area */

/* === LEFT EDGE COLUMN (left: 2-10%) === */
.tech-icon-1 {
    top: 8%;
    left: 5%;
    width: 38px;
    height: 38px;
}
.tech-icon-29 {
    top: 20%;
    left: 3%;
    width: 26px;
    height: 26px;
}
.tech-icon-32 {
    top: 32%;
    left: 7%;
    width: 32px;
    height: 32px;
}
.tech-icon-10 {
    top: 46%;
    left: 4%;
    width: 30px;
    height: 30px;
}
.tech-icon-3 {
    top: 60%;
    left: 6%;
    width: 28px;
    height: 28px;
}
.tech-icon-14 {
    top: 74%;
    left: 3%;
    width: 30px;
    height: 30px;
}
.tech-icon-7 {
    top: 88%;
    left: 8%;
    width: 28px;
    height: 28px;
}

/* === RIGHT EDGE COLUMN (right: 2-10%) === */
.tech-icon-13 {
    top: 10%;
    right: 5%;
    width: 34px;
    height: 34px;
}
.tech-icon-23 {
    top: 24%;
    right: 7%;
    width: 28px;
    height: 28px;
}
.tech-icon-2 {
    top: 36%;
    right: 4%;
    width: 34px;
    height: 34px;
}
.tech-icon-6 {
    top: 50%;
    right: 6%;
    width: 32px;
    height: 32px;
}
.tech-icon-28 {
    top: 64%;
    right: 5%;
    width: 28px;
    height: 28px;
}
.tech-icon-4 {
    top: 78%;
    right: 7%;
    width: 36px;
    height: 36px;
}
.tech-icon-22 {
    top: 90%;
    right: 4%;
    width: 32px;
    height: 32px;
}

/* === TOP CENTER BAND (top: 6-16%, spread across center) === */
/* Offset from top edge to account for float animation (20px upward) */
.tech-icon-16 {
    top: 6%;
    left: 20%;
    width: 26px;
    height: 26px;
}
.tech-icon-5 {
    top: 9%;
    left: 32%;
    width: 24px;
    height: 24px;
}
.tech-icon-20 {
    top: 7%;
    left: 44%;
    width: 22px;
    height: 22px;
}
.tech-icon-17 {
    top: 10%;
    right: 42%;
    width: 24px;
    height: 24px;
}
.tech-icon-8 {
    top: 6%;
    right: 30%;
    width: 26px;
    height: 26px;
}
.tech-icon-26 {
    top: 9%;
    right: 18%;
    width: 28px;
    height: 28px;
}
.tech-icon-21 {
    top: 14%;
    left: 26%;
    width: 22px;
    height: 22px;
}
.tech-icon-12 {
    top: 16%;
    right: 36%;
    width: 24px;
    height: 24px;
}

/* === BOTTOM CENTER BAND (top: 86-96%, right side only to avoid CTAs) === */
.tech-icon-24 {
    top: 88%;
    right: 32%;
    width: 24px;
    height: 24px;
}
.tech-icon-27 {
    top: 94%;
    right: 18%;
    width: 22px;
    height: 22px;
}
.tech-icon-30 {
    top: 86%;
    right: 42%;
    width: 26px;
    height: 26px;
}
.tech-icon-11 {
    top: 92%;
    right: 28%;
    width: 24px;
    height: 24px;
}

/* === MID-HEIGHT ACCENTS (right side has more inward space) === */
.tech-icon-18 {
    top: 70%;
    right: 20%;
    width: 26px;
    height: 26px;
}
.tech-icon-9 {
    top: 58%;
    right: 14%;
    width: 30px;
    height: 30px;
}
.tech-icon-15 {
    top: 40%;
    right: 12%;
    width: 26px;
    height: 26px;
}
.tech-icon-25 {
    top: 48%;
    right: 18%;
    width: 24px;
    height: 24px;
}
.tech-icon-31 {
    top: 72%;
    right: 16%;
    width: 24px;
    height: 24px;
}
.tech-icon-19 {
    top: 82%;
    right: 22%;
    width: 24px;
    height: 24px;
}

/* ========================================
   INTEGRATIONS PAGE TECH CAROUSEL
   ======================================== */
.tech-carousel {
    background: linear-gradient(180deg, #0a0e1a 0%, #0f1419 100%);
    border-top: 1px solid rgba(251, 191, 36, 0.15);
    border-bottom: 1px solid rgba(251, 191, 36, 0.15);
    padding: 24px 0;
    overflow: hidden;
    position: relative;
}

/* Fade edges */
.tech-carousel::before,
.tech-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    z-index: 2;
    pointer-events: none;
}

.tech-carousel::before {
    left: 0;
    background: linear-gradient(90deg, #0a0e1a 0%, transparent 100%);
}

.tech-carousel::after {
    right: 0;
    background: linear-gradient(90deg, transparent 0%, #0f1419 100%);
}

.tech-carousel-track {
    display: flex;
    gap: 48px;
    width: max-content;
    will-change: transform;
}

.tech-carousel-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.tech-carousel-icon:hover {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.4);
    transform: scale(1.1);
}

.tech-carousel-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: brightness(0) invert(1) opacity(0.8);
    transition: filter 0.3s ease;
}

.tech-carousel-icon:hover img {
    filter: brightness(0) saturate(100%) invert(78%) sepia(60%) saturate(600%) hue-rotate(360deg)
        brightness(103%) contrast(103%);
}

.tech-carousel-icon .carousel-placeholder {
    font-size: 20px;
    font-weight: 700;
    color: rgba(251, 191, 36, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
    .tech-carousel {
        padding: 16px 0;
    }

    .tech-carousel-track {
        gap: 32px;
    }

    .tech-carousel-icon {
        width: 40px;
        height: 40px;
    }

    .tech-carousel-icon img {
        width: 24px;
        height: 24px;
    }

    .tech-carousel::before,
    .tech-carousel::after {
        width: 60px;
    }
}

/* Floating animation */
@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.tech-icon-1,
.tech-icon-5,
.tech-icon-9,
.tech-icon-13,
.tech-icon-17,
.tech-icon-21,
.tech-icon-25,
.tech-icon-29 {
    animation: float 10s ease-in-out infinite;
}

.tech-icon-2,
.tech-icon-6,
.tech-icon-10,
.tech-icon-14,
.tech-icon-18,
.tech-icon-22,
.tech-icon-26,
.tech-icon-30 {
    animation: float 11s ease-in-out infinite 0.5s;
}

.tech-icon-3,
.tech-icon-7,
.tech-icon-11,
.tech-icon-15,
.tech-icon-19,
.tech-icon-23,
.tech-icon-27,
.tech-icon-31 {
    animation: float 12s ease-in-out infinite 1s;
}

.tech-icon-4,
.tech-icon-8,
.tech-icon-12,
.tech-icon-16,
.tech-icon-20,
.tech-icon-24,
.tech-icon-28,
.tech-icon-32 {
    animation: float 13 ease-in-out infinite 1.5s;
}

/* ========================================
   SECTION HEADER WITH COUNTS
   ======================================== */
.section-header-with-counts {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-header-with-counts h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.counts-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    padding: 0 10px;
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--el-cyan);
}

.count-label {
    font-size: 14px;
    color: var(--text-muted);
}

/* ========================================
   FILTER BAR (type toggle + category)
   ======================================== */
.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 12px;
}

.type-toggle {
    display: flex;
    gap: 8px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    width: fit-content;
}

.type-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.type-toggle-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.type-toggle-btn.active {
    background: rgba(0, 212, 255, 0.15);
    color: var(--el-cyan);
}

.type-toggle-btn .type-icon {
    font-size: 14px;
    font-weight: 700;
}

.category-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.category-filter-bar .filter-btn {
    padding: 5px 10px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.category-filter-bar .filter-btn:hover {
    border-color: rgba(0, 212, 255, 0.4);
    color: var(--text-primary);
}

.category-filter-bar .filter-btn.active {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.4);
    color: var(--el-cyan);
}

/* ========================================
   GUARDRAIL CARD TITLE ROW (with badge)
   ======================================== */
.guardrail-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.guardrail-title-row h4 {
    margin: 0;
    flex: 1;
}

.guardrail-title-row .type-badge {
    flex-shrink: 0;
}

/* ========================================
   SIMPLIFIED 2-STEP FLOW
   ======================================== */
.guardrails-flow-simple {
    max-width: 700px;
    margin: 0 auto;
}

.guardrails-flow-simple .flow-item {
    max-width: 280px;
}

.flow-icon.integration-icon {
    display: flex;
    gap: 8px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.25);
}

.flow-icon.integration-icon .flow-icon-collector {
    color: var(--el-cyan);
    font-size: 20px;
    font-weight: 700;
}

.flow-icon.integration-icon .flow-icon-cataloger {
    color: var(--type-cataloger);
    font-size: 20px;
    font-weight: 700;
}

/* ========================================
   PLUGIN TYPES GRID (index only)
   ======================================== */
.plugin-types-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 80px;
}

.plugin-type-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-section-dark) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 28px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.plugin-type-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.plugin-type-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.plugin-type-header h3 {
    flex: 1;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.plugin-type-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.plugin-type-icon .type-icon {
    font-size: 24px;
    font-weight: 700;
}

.plugin-type-icon.collector {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 212, 255, 0.1) 100%);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: var(--type-collector);
}

.plugin-type-icon.policy {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2) 0%, rgba(0, 255, 136, 0.1) 100%);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: var(--type-policy);
}

.plugin-type-icon.cataloger {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(251, 191, 36, 0.1) 100%);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: var(--type-cataloger);
}

.plugin-type-desc {
    font-size: 15px;
    line-height: 24px;
    color: var(--text-secondary);
    margin: 0 0 20px;
    flex-grow: 1;
}

.plugin-type-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.plugin-type-arrow {
    font-size: 20px;
    color: var(--text-muted);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.plugin-type-card:hover .plugin-type-arrow {
    color: var(--el-cyan);
    transform: translateX(4px);
}

/* ========================================
   HOW GUARDRAILS WORK (flow diagram)
   ======================================== */
.how-guardrails-work {
    margin-top: 60px;
    margin-bottom: 80px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, rgba(0, 255, 136, 0.03) 100%);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    position: relative;
}

.how-guardrails-work::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00d4ff 0%, #00ff88 100%);
    border-radius: 20px 20px 0 0;
}

.how-guardrails-work h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 32px;
    text-align: center;
}

.guardrails-flow {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
}

.flow-item {
    flex: 1;
    max-width: 200px;
    text-align: center;
}

.flow-item .flow-number {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 auto 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.flow-item .flow-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 26px;
    font-weight: 700;
}

.flow-icon.collector-icon {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.25);
    color: var(--type-collector);
}

.flow-icon.cataloger-icon {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.25);
    color: var(--type-cataloger);
}

.flow-icon.policy-icon {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.25);
    color: var(--type-policy);
}

.flow-icon.json-icon {
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: var(--type-component-json);
    font-family: var(--font-mono);
    font-size: 18px;
}

.flow-item h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 10px;
}

.flow-item p {
    font-size: 14px;
    line-height: 21px;
    color: var(--text-muted);
    margin: 0;
}

a.flow-item-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

a.flow-item-link:hover {
    transform: translateY(-2px);
}

a.flow-item-link:hover .flow-icon {
    border-color: var(--el-cyan);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}

a.flow-item-link:hover h3 {
    color: var(--el-cyan);
}

.guardrails-flow > .flow-arrow {
    color: var(--text-muted);
    font-size: 24px;
    padding-top: 52px;
    flex-shrink: 0;
}

.flow-cta {
    margin-top: 40px;
    text-align: center;
}

.flow-cta .arrow-link {
    border-bottom: none;
}

.flow-cta .arrow-link:hover {
    gap: 12px;
}

/* ========================================
   ALL GUARDRAILS SECTION
   ======================================== */
.all-guardrails-section {
    margin-bottom: 60px;
}

.all-guardrails-section > h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px;
}

.all-guardrails-section > .section-intro {
    font-size: 16px;
    line-height: 26px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* Scrollable integrations grid */
.all-guardrails-section .guardrails-grid {
    height: 60vh;
    min-height: 400px;
    max-height: 800px;
    overflow-y: auto;
    padding-right: 8px;
    padding-bottom: 16px;
    /* Align content to top when there are few items */
    align-content: start;
}

/* Custom scrollbar for the grid */
.all-guardrails-section .guardrails-grid::-webkit-scrollbar {
    width: 6px;
}

.all-guardrails-section .guardrails-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.all-guardrails-section .guardrails-grid::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 3px;
}

.all-guardrails-section .guardrails-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
}

/* Firefox scrollbar */
.all-guardrails-section .guardrails-grid {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 255, 0.3) rgba(255, 255, 255, 0.05);
}

/* Filtered out cards */
.guardrail-card.filtered-out {
    display: none;
}

.guardrails-category {
    margin-bottom: 48px;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.category-header h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.view-all-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--el-cyan);
    text-decoration: none;
    transition: color 0.2s ease;
}

.view-all-link:hover {
    color: var(--success);
}

/* ========================================
   CUSTOM GUARDRAILS CTA
   ======================================== */
.custom-guardrails-cta {
    display: flex;
    align-items: center;
    gap: 32px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.08) 0%, rgba(0, 212, 255, 0.05) 100%);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 16px;
    padding: 32px 40px;
}

.custom-guardrails-cta .cta-content {
    flex: 1;
}

.custom-guardrails-cta h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.custom-guardrails-cta p {
    font-size: 15px;
    line-height: 24px;
    color: var(--text-secondary);
    margin: 0;
}

.custom-guardrails-cta .cta-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.custom-guardrails-cta .btn {
    padding: 12px 20px;
    font-size: 14px;
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: 60px 40px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.empty-state p {
    font-size: 16px;
    color: var(--text-muted);
    margin: 0;
}

/* ========================================
   RESPONSIVE (index only)
   ======================================== */
@media (max-width: 1024px) {
    .tech-icon-5,
    .tech-icon-8,
    .tech-icon-11,
    .tech-icon-15,
    .tech-icon-17,
    .tech-icon-19,
    .tech-icon-21,
    .tech-icon-23,
    .tech-icon-25,
    .tech-icon-27,
    .tech-icon-29,
    .tech-icon-31 {
        display: none;
    }
}

@media (max-width: 900px) {
    .plugin-types-grid {
        grid-template-columns: 1fr;
    }

    .guardrails-flow {
        flex-wrap: wrap;
        gap: 24px;
    }

    .guardrails-flow > .flow-arrow {
        display: none;
    }

    .flow-item {
        flex: 0 0 calc(50% - 12px);
        max-width: none;
    }
}

@media (max-width: 768px) {
    /* Show tech-cloud but with fewer icons and more transparency */
    .tech-cloud {
        display: block;
    }

    /* Make all icons more transparent, smaller, and remove animation on mobile */
    .tech-icon {
        opacity: 0.2;
        animation: none !important;
        transform: scale(0.5);
    }

    /* Hide most icons, keep only 10 */
    .tech-icon-29,
    .tech-icon-14,
    .tech-icon-23,
    .tech-icon-28,
    .tech-icon-5,
    .tech-icon-16,
    .tech-icon-17,
    .tech-icon-20,
    .tech-icon-21,
    .tech-icon-8,
    .tech-icon-12,
    .tech-icon-26,
    .tech-icon-24,
    .tech-icon-27,
    .tech-icon-30,
    .tech-icon-11,
    .tech-icon-18,
    .tech-icon-9,
    .tech-icon-15,
    .tech-icon-25,
    .tech-icon-31,
    .tech-icon-19 {
        display: none;
    }

    /* Reposition the 10 visible icons along the top edge */
    .tech-icon-1 {
        top: 4%;
        left: 3%;
    }
    .tech-icon-32 {
        top: 6%;
        left: 14%;
    }
    .tech-icon-10 {
        top: 3%;
        left: 28%;
    }
    .tech-icon-3 {
        top: 7%;
        left: 42%;
    }
    .tech-icon-7 {
        top: 4%;
        left: 58%;
    }
    .tech-icon-13 {
        top: 6%;
        left: 72%;
    }
    .tech-icon-2 {
        top: 3%;
        left: 84%;
    }
    .tech-icon-6 {
        top: 8%;
        right: 5%;
    }
    .tech-icon-4 {
        top: 5%;
        left: 36%;
    }
    .tech-icon-22 {
        top: 7%;
        right: 18%;
    }

    /* Filter bar responsive */
    .section-header-with-counts {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .type-toggle {
        width: 100%;
        justify-content: center;
    }

    .type-toggle-btn {
        flex: 1;
        justify-content: center;
        padding: 10px 12px;
        font-size: 13px;
    }

    .category-filter-bar {
        gap: 6px;
    }

    .category-filter-bar .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Card title row responsive */
    .guardrail-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .custom-guardrails-cta {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 28px;
    }

    .custom-guardrails-cta .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .custom-guardrails-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .flow-item {
        flex: 0 0 100%;
    }

    /* Simplified flow responsive */
    .guardrails-flow-simple .flow-item {
        max-width: none;
    }
}

/* ========================================
   SPLIT-VIEW LAYOUT (guardrails page)
   ======================================== */

/* Results container maintains consistent height */
.results-container {
    height: 75vh;
    min-height: 600px;
    max-height: 1000px;
    margin-bottom: 64px;
    position: relative;
}

.guardrails-split-view {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    height: 100%;
}

/* Empty state fills container and centers content */
.results-container .empty-state {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
}

.policies-panel,
.guardrails-panel {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.panel-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.panel-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 8px;
    background: rgba(0, 212, 255, 0.15);
    border-radius: 11px;
    font-size: 12px;
    font-weight: 600;
    color: var(--el-cyan);
}

/* Policies Panel (Left) */
.policies-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.policy-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.policy-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.policy-item.active {
    background: rgba(0, 255, 136, 0.08);
    border-color: rgba(0, 255, 136, 0.25);
}

.policy-item.filtered-out {
    display: none;
}

/* Link button to policy page - shows on hover */
.policy-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    color: var(--cyan);
    opacity: 0;
    transform: scale(0.8);
    transition:
        opacity 0.15s ease,
        transform 0.15s ease,
        background 0.15s ease;
    flex-shrink: 0;
    margin-right: 4px;
}

.policy-item:hover .policy-link-btn {
    opacity: 1;
    transform: scale(1);
}

.policy-link-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.4);
}

.policy-link-btn svg {
    width: 14px;
    height: 14px;
    stroke: var(--el-cyan);
}

.policy-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
    flex-shrink: 0;
}

.policy-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.policy-icon-placeholder {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.policy-icon .placeholder-symbol {
    font-size: 14px;
    color: var(--type-policy);
}

.policy-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.policy-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.policy-count {
    font-size: 12px;
    color: var(--text-muted);
}

.policy-arrow {
    font-size: 18px;
    color: var(--text-muted);
    opacity: 0;
    transition: all 0.2s ease;
}

.policy-item:hover .policy-arrow,
.policy-item.active .policy-arrow {
    opacity: 1;
    color: var(--type-policy);
}

/* Guardrails Panel (Right) */
.guardrails-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.guardrail-item {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.guardrail-item:hover {
    background: rgba(0, 255, 136, 0.04);
    border-color: rgba(0, 255, 136, 0.15);
}

.guardrail-item.filtered-out {
    display: none;
}

.guardrail-item.highlighted,
.guardrail-item.hover-highlight {
    background: rgba(0, 255, 136, 0.08);
    border-color: rgba(0, 255, 136, 0.25);
}

.policy-item.hover-highlight {
    background: rgba(0, 255, 136, 0.06);
    border-color: rgba(0, 255, 136, 0.2);
}

.guardrail-item-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 136, 0.15);
    color: var(--type-policy);
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 2px;
}

.guardrail-item-content {
    flex: 1;
    min-width: 0;
}

.guardrail-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.guardrail-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--el-cyan);
    font-family: var(--font-mono);
    background: rgba(0, 212, 255, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
}

.guardrail-item-desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0 0 8px;
}

.guardrail-item-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.keyword-tag {
    font-size: 11px;
    color: var(--text-muted);
    padding: 2px 8px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 10px;
}

/* Custom scrollbars for panels */
.policies-list::-webkit-scrollbar,
.guardrails-list::-webkit-scrollbar {
    width: 6px;
}

.policies-list::-webkit-scrollbar-track,
.guardrails-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
}

.policies-list::-webkit-scrollbar-thumb,
.guardrails-list::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.25);
    border-radius: 3px;
}

.policies-list::-webkit-scrollbar-thumb:hover,
.guardrails-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.4);
}

/* Firefox scrollbars */
.policies-list,
.guardrails-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 255, 0.25) rgba(255, 255, 255, 0.03);
}

/* ========================================
   SEARCH CONTAINER (guardrails page)
   ======================================== */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
}

.search-container.search-container-full {
    max-width: none;
    margin-bottom: 24px;
}

.search-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 14px 44px 14px 48px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
    border-color: rgba(0, 212, 255, 0.5);
    background: rgba(0, 212, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.search-clear {
    position: absolute;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-clear:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

/* ========================================
   GUARDRAIL CARD WRAPPER (guardrails page)
   ======================================== */
.guardrail-card-wrapper {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-section-dark) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.guardrail-card-wrapper:hover {
    border-color: rgba(0, 255, 136, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.guardrail-card-wrapper.filtered-out {
    display: none;
}

/* Override card styles within wrapper */
.guardrail-card-wrapper > .guardrail-card {
    background: transparent;
    border: none;
    border-radius: 0;
}

.guardrail-card-wrapper > .guardrail-card:hover {
    transform: none;
    box-shadow: none;
}

/* ========================================
   GUARDRAIL META (count + category tag)
   ======================================== */
.guardrail-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.guardrail-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--type-policy);
}

.category-tag {
    font-size: 12px;
    color: var(--text-muted);
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

/* ========================================
   EXPANDABLE GUARDRAILS PREVIEW
   ======================================== */
.guardrails-preview {
    padding: 0 20px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: -4px;
}

.guardrails-preview-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
}

.guardrail-preview-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(0, 255, 136, 0.03);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.guardrail-preview-item:hover {
    background: rgba(0, 255, 136, 0.06);
}

.guardrail-preview-item.hidden-guardrail {
    display: none;
}

.guardrail-preview-item.hidden-guardrail.visible {
    display: flex;
}

.guardrail-check {
    flex-shrink: 0;
    color: var(--type-policy);
    font-size: 12px;
    margin-top: 2px;
}

.guardrail-preview-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.guardrail-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.guardrail-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.guardrails-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.guardrails-expand-btn:hover {
    border-color: rgba(0, 255, 136, 0.3);
    color: var(--type-policy);
    background: rgba(0, 255, 136, 0.03);
}

.guardrails-expand-btn .expand-icon {
    transition: transform 0.2s ease;
}

/* ========================================
   COUNT SEPARATOR & SECONDARY BADGE
   ======================================== */
.count-separator {
    color: var(--text-muted);
    font-size: 14px;
}

.count-badge-secondary {
    background: rgba(0, 255, 136, 0.15);
    border-color: rgba(0, 255, 136, 0.3);
    color: var(--type-policy);
}

/* ========================================
   EMPTY STATE (enhanced for guardrails)
   ======================================== */
.empty-state-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 50%;
    color: var(--text-muted);
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.empty-state-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    margin: 0;
}

.empty-state .btn {
    margin-top: 24px;
    padding: 10px 20px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.empty-state .btn::before {
    display: none; /* Remove shimmer effect */
}

.empty-state .btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transform: none;
}

/* ========================================
   RESPONSIVE (split-view & search)
   ======================================== */
@media (max-width: 900px) {
    .results-container {
        height: auto;
        min-height: 500px;
        max-height: none;
    }

    .guardrails-split-view {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: auto;
    }

    .policies-panel {
        max-height: 350px;
        overflow: visible;
    }

    .policies-panel .policies-list {
        max-height: 280px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .guardrails-panel {
        min-height: 400px;
    }

    .results-container .empty-state {
        position: relative;
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .search-container {
        max-width: none;
    }

    .search-input {
        padding: 12px 40px 12px 44px;
        font-size: 14px;
    }

    .guardrails-split-view {
        gap: 16px;
    }

    .policies-panel {
        max-height: none;
        overflow: visible;
    }

    .policies-list {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        overflow-x: hidden;
        overflow-y: visible;
        gap: 8px;
        padding: 8px 12px;
        max-height: none;
    }

    .policy-item {
        flex-shrink: 0;
        padding: 8px 12px;
    }

    .policy-info {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .policy-arrow {
        display: none;
    }

    .guardrail-item {
        padding: 12px;
    }

    .guardrail-item-desc {
        font-size: 12px;
    }

    .empty-state-icon {
        width: 64px;
        height: 64px;
    }
}

/* ========================================
   INTEGRATIONS PAGE - AMBER/GOLD THEME
   ======================================== */

/* Content section with amber ambient glow */
.guardrails-index-content--integrations {
    background: linear-gradient(180deg, #0a0e1a 0%, #12100a 50%, #0f1419 100%);
    position: relative;
}

.guardrails-index-content--integrations::before {
    content: '';
    position: absolute;
    top: 10%;
    right: -5%;
    width: 40%;
    height: 50%;
    background: radial-gradient(ellipse, rgba(251, 191, 36, 0.08) 0%, transparent 70%);
    filter: blur(100px);
    pointer-events: none;
}

.guardrails-index-content--integrations::after {
    content: '';
    position: absolute;
    bottom: 20%;
    left: -5%;
    width: 35%;
    height: 40%;
    background: radial-gradient(ellipse, rgba(251, 191, 36, 0.06) 0%, transparent 70%);
    filter: blur(100px);
    pointer-events: none;
}

/* Amber count badges */
.guardrails-index-content--integrations .count-badge {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

/* Amber type toggle - "All" button uses amber when active */
.guardrails-index-content--integrations .type-toggle-btn.active[data-type='all'] {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

/* Amber type toggle - Cataloger button uses amber when active */
.guardrails-index-content--integrations .type-toggle-btn.active[data-type='cataloger'] {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

/* Collector button keeps cyan */
.guardrails-index-content--integrations .type-toggle-btn.active[data-type='collector'] {
    background: rgba(0, 212, 255, 0.15);
    color: var(--el-cyan);
}

/* Amber category filter buttons */
.guardrails-index-content--integrations .category-filter-bar .filter-btn:hover {
    border-color: rgba(251, 191, 36, 0.4);
}

.guardrails-index-content--integrations .category-filter-bar .filter-btn.active {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.4);
    color: #fbbf24;
}

/* Amber card hover - for cataloger cards */
.guardrails-index-content--integrations .guardrail-card[data-type='cataloger']:hover {
    background: rgba(251, 191, 36, 0.05);
    border-color: rgba(251, 191, 36, 0.25);
}

/* Collector cards keep cyan hover */
.guardrails-index-content--integrations .guardrail-card[data-type='collector']:hover {
    background: rgba(0, 212, 255, 0.05);
    border-color: rgba(0, 212, 255, 0.2);
}

/* Amber icon placeholder for catalogers */
.guardrails-index-content--integrations
    .guardrail-card[data-type='cataloger']
    .guardrail-icon-placeholder {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.2);
}

.guardrails-index-content--integrations
    .guardrail-card[data-type='cataloger']
    .guardrail-icon-placeholder
    .placeholder-symbol {
    color: #fbbf24;
}

/* Amber scrollbar */
.guardrails-index-content--integrations .guardrails-grid::-webkit-scrollbar-thumb {
    background: rgba(251, 191, 36, 0.3);
}

.guardrails-index-content--integrations .guardrails-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(251, 191, 36, 0.5);
}

.guardrails-index-content--integrations .guardrails-grid {
    scrollbar-color: rgba(251, 191, 36, 0.3) rgba(255, 255, 255, 0.05);
}

/* How It Works section - amber theme */
.how-guardrails-work--integrations {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.06) 0%, rgba(0, 212, 255, 0.03) 100%);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.how-guardrails-work--integrations::before {
    background: linear-gradient(90deg, #fbbf24 0%, #00d4ff 100%);
}

/* Custom CTA section - amber theme */
.custom-guardrails-cta--integrations {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(0, 212, 255, 0.04) 100%);
    border: 1px solid rgba(251, 191, 36, 0.25);
}

/* Amber primary button variant */
.guardrails-index-hero--integrations .btn-primary,
.custom-guardrails-cta--integrations .btn-primary {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #0a0e1a;
}

.guardrails-index-hero--integrations .btn-primary:hover,
.custom-guardrails-cta--integrations .btn-primary:hover {
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
}

/* Amber secondary button variant */
.guardrails-index-hero--integrations .btn-secondary,
.custom-guardrails-cta--integrations .btn-secondary {
    border-color: rgba(251, 191, 36, 0.4);
}

.guardrails-index-hero--integrations .btn-secondary:hover,
.custom-guardrails-cta--integrations .btn-secondary:hover {
    border-color: rgba(251, 191, 36, 0.6);
    background: rgba(251, 191, 36, 0.1);
}

/* Flow CTA arrow link - amber */
.how-guardrails-work--integrations .arrow-link {
    color: #fbbf24;
}

.how-guardrails-work--integrations .arrow-link:hover {
    color: #f59e0b;
}
