/* ==========================================================================
   SECTION: SEARCH INTENT — 4-Card Intent Matrix with Micro-Expansion on Hover
   ========================================================================== */

.search-intent-section {
    position: relative;
    z-index: 2;
    padding-top: 3rem;
    padding-bottom: 3rem;
    border: none !important;
}

@media (min-width: 640px) {
    .search-intent-section {
        padding-top: 4.5rem;
        padding-bottom: 4.5rem;
    }
}

/* Desktop: 4-column grid */
.search-intent-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: flex-start;
}

@media (min-width: 768px) and (max-width: 1024px) {
    .search-intent-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 767px) {
    .search-intent-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 1rem;
        padding-bottom: 0.75rem;
        scrollbar-width: none;
    }
    .search-intent-grid::-webkit-scrollbar { display: none; }
    .search-intent-grid .intent-card {
        flex: 0 0 85%;
        scroll-snap-align: center;
    }
}

/* Base Card Style (Matches Reference Image) */
.intent-card {
    background-color: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 20px;
    padding: 1.5rem 1.35rem;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 2px 8px rgba(32, 33, 36, 0.03);
    transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 280ms cubic-bezier(0.16, 1, 0.3, 1),
                border-color 240ms ease;
    cursor: default;
}

.intent-card:hover {
    transform: translateY(-6px) scale(1.015);
    border-color: var(--intent-accent, #4285f4);
    box-shadow: 0 16px 36px -8px rgba(32, 33, 36, 0.1), 0 0 0 1.5px var(--intent-accent-border, rgba(66, 133, 244, 0.3));
    z-index: 10;
}

/* Card Header */
.intent-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.15rem;
}

.intent-icon-badge {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--intent-tint, #f1f3f4);
    border: 1px solid var(--intent-tint-border, rgba(0, 0, 0, 0.06));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--intent-accent, #5f6368);
    flex-shrink: 0;
    transition: transform 260ms ease, box-shadow 260ms ease;
}

.intent-card:hover .intent-icon-badge {
    transform: scale(1.1) rotate(-3deg);
    box-shadow: 0 4px 14px var(--intent-glow, rgba(0, 0, 0, 0.1));
}

.intent-tag-mini {
    font-family: var(--font-mono, monospace);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3.5px 8.5px;
    border-radius: 6px;
    background: var(--intent-tint, #f1f3f4);
    color: var(--intent-accent, #5f6368);
    border: 1px solid var(--intent-tint-border, rgba(0, 0, 0, 0.06));
}

/* Title */
.intent-card-title {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-weight: 700;
    font-size: 1.15rem;
    color: #202124;
    line-height: 1.3;
    margin: 0 0 0.7rem 0;
}

/* Query Box snippet */
.intent-query-box {
    background: #f8f9fb;
    border: 1px solid #e8eaed;
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    font-size: 13px;
    font-weight: 600;
    color: #202124;
    margin-bottom: 0.75rem;
    line-height: 1.45;
}

/* Description */
.intent-card-desc {
    font-size: 13px;
    line-height: 1.55;
    color: #5f6368;
    margin: 0;
}

/* Micro-Expanded Hover Details via CSS Grid 0fr -> 1fr */
.intent-hover-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
    border-top: 1px dashed transparent;
    transition: grid-template-rows 300ms cubic-bezier(0.16, 1, 0.3, 1),
                opacity 240ms ease,
                margin-top 240ms ease,
                padding-top 240ms ease,
                border-color 240ms ease;
}

.intent-hover-wrapper > .intent-hover-inner {
    overflow: hidden;
    min-height: 0;
}

.intent-hover-details {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding-top: 0.2rem;
}

.intent-card:hover .intent-hover-wrapper {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top-color: #e8eaed;
}

.intent-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    line-height: 1.4;
}

.intent-detail-label {
    color: #5f6368;
    font-family: var(--font-sans);
}

.intent-detail-val {
    font-weight: 600;
    color: #202124;
    text-align: right;
}

.intent-detail-val.highlight-metric {
    color: var(--intent-accent, #202124);
}

/* Theme Color Tokens */
.intent-theme-gray {
    --intent-accent: #5f6368;
    --intent-tint: #f1f3f4;
    --intent-tint-border: rgba(0, 0, 0, 0.07);
    --intent-glow: rgba(95, 99, 104, 0.18);
    --intent-accent-border: rgba(95, 99, 104, 0.3);
}

.intent-theme-yellow {
    --intent-accent: #b06000;
    --intent-tint: #fef7e0;
    --intent-tint-border: rgba(251, 188, 5, 0.28);
    --intent-glow: rgba(251, 188, 5, 0.25);
    --intent-accent-border: rgba(251, 188, 5, 0.45);
}

.intent-theme-green {
    --intent-accent: #137333;
    --intent-tint: #e6f4ea;
    --intent-tint-border: rgba(52, 168, 83, 0.24);
    --intent-glow: rgba(52, 168, 83, 0.22);
    --intent-accent-border: rgba(52, 168, 83, 0.4);
}

.intent-theme-blue {
    --intent-accent: #1a73e8;
    --intent-tint: #e8f0fe;
    --intent-tint-border: rgba(66, 133, 244, 0.24);
    --intent-glow: rgba(66, 133, 244, 0.22);
    --intent-accent-border: rgba(66, 133, 244, 0.4);
}
