/* ==========================================================================
   Technologies & Platforms We Work With (#technologies)
   Tab navigation + category panels. Builds on the existing .tech-tile /
   .tech-tile-icon / .tech-tile-name components defined in
   blog-casestudies.css — this file only adds the tab/panel chrome.
   ========================================================================== */

.techstack {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* --- Tabs --- */

.techstack-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.techstack-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    border-radius: 9999px;
    border: 1.5px solid #e5e7eb;
    background: #ffffff;
    color: #4b5563;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.techstack-tab i {
    font-size: 0.85rem;
    color: #9ca3af;
    transition: color 0.25s ease;
}

.techstack-tab:hover {
    border-color: #FF0032;
    color: #0D2C40;
}

.techstack-tab:focus-visible {
    outline: 2px solid #FF0032;
    outline-offset: 2px;
}

.techstack-tab.is-active {
    background: linear-gradient(135deg, #0D2C40 0%, #163f5c 100%);
    border-color: #0D2C40;
    color: #ffffff;
    box-shadow: 0 10px 24px -10px rgba(13, 44, 64, 0.5);
}

.techstack-tab.is-active i {
    color: #ffffff;
}

/* Small indicator dot marking the highest lead-gen-value categories */
.techstack-tab--priority::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FF0032;
    box-shadow: 0 0 0 2px #ffffff;
}

.techstack-tab--priority.is-active::after {
    background: #ffffff;
    box-shadow: 0 0 0 2px #0D2C40;
}

/* --- Panels --- */

.techstack-panels {
    position: relative;
}

.techstack-panel {
    display: none;
}

.techstack-panel.is-active {
    display: block;
    animation: techPanelIn 0.45s ease;
}

@keyframes techPanelIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.techstack-panel-head {
    max-width: 48rem;
    margin: 0 auto 1.85rem;
    text-align: center;
}

.techstack-panel-head h4 {
    font-size: 1.375rem;
    font-weight: 800;
    color: #0D2C40;
    margin-bottom: 0.5rem;
}

.techstack-panel-head p {
    color: #6b7280;
    font-size: 0.9375rem;
    line-height: 1.65;
}

/* Featured treatment for the highest-priority categories (AI, CRM, ERP,
   Cloud & DevOps, Integration) — a soft enterprise-grade card frame instead
   of a plain flat panel, so they visually outrank the rest of the tabs. */
.techstack-panel--featured {
    padding: 2rem 2rem 2.25rem;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 0, 50, 0.04), rgba(13, 44, 64, 0.015) 60%);
    border: 1px solid rgba(13, 44, 64, 0.08);
}

.techstack-subgroup {
    text-align: center;
}

.techstack-subgroup + .techstack-subgroup {
    margin-top: 1.85rem;
}

.techstack-subgroup-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #FF0032;
    font-weight: 800;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1.1rem;
}

.techstack-panel .tech-tile-grid {
    justify-content: center;
}

/* Service-oriented chips (e.g. "ERP Integration", "CRM Integration") shown
   under a panel's tile grid — deliberately not styled as fake tech logos. */
.techstack-pill-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.85rem;
    padding-top: 1.85rem;
    border-top: 1px dashed #e5e7eb;
}

.techstack-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.95rem;
    border-radius: 9999px;
    background: #f3f4f6;
    color: #0D2C40;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.01em;
    border: 1px solid #e5e7eb;
}

@media (max-width: 640px) {
    .techstack-tabs {
        gap: 0.45rem;
    }

    .techstack-tab {
        padding: 0.55rem 0.9rem;
        font-size: 0.75rem;
    }

    .techstack-panel--featured {
        padding: 1.5rem 1.25rem 1.75rem;
        border-radius: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .techstack-panel.is-active {
        animation: none;
    }
}
