/* Split out of style.css — enqueued only where it is needed.
   Edit here, not in style.css. */

/* ═══════════════════════════════════════════════════════
   22. INTERACTIVE LIVE CODE & AI TERMINAL
═══════════════════════════════════════════════════════ */
.tpc-terminal-container {
    width: 100%;
    max-width: 820px;
    margin: 2.5rem auto 0;
    text-align: left;
    direction: ltr;
}
.tpc-terminal {
    background: rgba(10, 15, 29, 0.85);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: var(--r-lg);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.7), 0 0 35px -5px rgba(59, 130, 246, 0.2);
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    font-family: 'Fira Code', 'JetBrains Mono', Consolas, Monaco, monospace;
}
.tpc-terminal-header {
    background: rgba(15, 23, 42, 0.9);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 1rem;
}
.tpc-terminal-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}
.tpc-term-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}
.tpc-term-red { background: #ef4444; }
.tpc-term-yellow { background: #f59e0b; }
.tpc-term-green { background: #10b981; }

.tpc-terminal-tabs {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.tpc-terminal-tabs::-webkit-scrollbar { display: none; }
.tpc-terminal-tab {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    padding: 0.35rem 0.85rem;
    border-radius: var(--r-sm);
    font-size: 0.75rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.tpc-terminal-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}
.tpc-terminal-tab.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    color: #60a5fa;
}

.tpc-terminal-body {
    padding: 1.25rem 1.5rem;
    min-height: 220px;
    max-height: 320px;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.7;
    color: #cbd5e1;
}
.tpc-terminal-line {
    margin-bottom: 0.35rem;
    word-break: break-word;
}
.tpc-prompt { color: #10b981; font-weight: bold; margin-right: 0.5rem; }
.tpc-cmd { color: #f8fafc; font-weight: 600; }
.tpc-info { color: #38bdf8; }
.tpc-success { color: #4ade80; }
.tpc-warn { color: #facc15; }
.tpc-accent { color: #c084fc; }
.tpc-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background: #60a5fa;
    vertical-align: middle;
    margin-left: 4px;
    animation: tpc-blink 1s infinite;
}
@keyframes tpc-blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

@media (max-width: 600px) {
    .tpc-terminal-body {
        padding: 1rem;
        font-size: 0.76rem;
        min-height: 190px;
    }
    .tpc-terminal-tab span { font-size: 0.7rem; }
}

/* ═══════════════════════════════════════════════════════
   25. INTERACTIVE BEFORE / AFTER SHOWCASE SLIDER
═══════════════════════════════════════════════════════ */
/* Section Styling */
.tpc-transformation-section {
    position: relative;
    padding-top: 5rem;
    padding-bottom: 6rem;
    background: radial-gradient(circle at 50% 20%, rgba(30, 41, 59, 0.4) 0%, rgba(2, 6, 23, 0.95) 70%);
}

/* Drag Guide Hint Badge */
.tpc-ba-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin: 0 auto 1.75rem;
    padding: 0.55rem 1.4rem;
    border-radius: var(--r-full, 9999px);
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #38bdf8;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.12);
    animation: tpcBaHintPulse 3s ease-in-out infinite;
}
.tpc-ba-hint i {
    font-size: 0.95rem;
    animation: tpcBaArrowShift 1.8s ease-in-out infinite alternate;
}
@keyframes tpcBaHintPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(56, 189, 248, 0.12); }
    50% { box-shadow: 0 4px 30px rgba(56, 189, 248, 0.25); border-color: rgba(56, 189, 248, 0.45); }
}
@keyframes tpcBaArrowShift {
    0% { transform: translateX(-3px); }
    100% { transform: translateX(3px); }
}

/* Browser/Terminal Window Frame */
.tpc-ba-window {
    max-width: 1040px;
    margin: 0 auto;
    background: #090d16;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 30px 80px -15px rgba(0, 0, 0, 0.75), 0 0 50px rgba(56, 189, 248, 0.06);
    position: relative;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Window Bar (macOS / Dev style) */
.tpc-ba-window-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 46px;
    padding: 0 1.25rem;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    direction: ltr !important; /* Mac controls are universally LTR */
    user-select: none;
    -webkit-user-select: none;
}
.tpc-ba-traffic-lights {
    display: flex;
    align-items: center;
    gap: 7px;
}
.tpc-ba-traffic-lights .t-light {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.tpc-ba-traffic-lights .t-light.red { background: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.5); }
.tpc-ba-traffic-lights .t-light.yellow { background: #f59e0b; box-shadow: 0 0 8px rgba(245, 158, 11, 0.5); }
.tpc-ba-traffic-lights .t-light.green { background: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.5); }
.tpc-ba-traffic-lights:hover .t-light { transform: scale(1.1); }

.tpc-ba-url-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 1.1rem;
    background: rgba(2, 6, 23, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    color: #94a3b8;
    font-size: 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tpc-ba-url-bar i {
    color: #38bdf8;
    font-size: 0.78rem;
    flex-shrink: 0;
}
.tpc-ba-window-tools {
    color: #64748b;
    font-size: 0.85rem;
    cursor: default;
    transition: color 0.2s ease;
}
.tpc-ba-window-tools:hover {
    color: #e2e8f0;
}

/* Slider Canvas Container */
.tpc-ba-container {
    width: 100%;
    min-height: 520px;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    direction: ltr !important; /* Critical: slider coordinates are physical LTR */
    cursor: ew-resize;
    background: #050a12;
}

/* Before and After Absolute Canvas Layers */
.tpc-ba-side {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* BEFORE LAYER: Dark Crimson Cyber Architecture */
.tpc-ba-before {
    background: 
        radial-gradient(circle at 18% 45%, rgba(239, 68, 68, 0.16) 0%, transparent 60%),
        radial-gradient(circle at 40% 80%, rgba(185, 28, 28, 0.1) 0%, transparent 50%),
        linear-gradient(145deg, #160d16 0%, #0d060c 60%, #080307 100%);
    z-index: 2;
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
    transition: clip-path 0.03s linear;
}
.tpc-ba-before::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(239, 68, 68, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(239, 68, 68, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

/* AFTER LAYER: High-Tech Emerald/Cyan Cloud Grid */
.tpc-ba-after {
    background: 
        radial-gradient(circle at 82% 45%, rgba(16, 185, 129, 0.18) 0%, transparent 60%),
        radial-gradient(circle at 60% 80%, rgba(56, 189, 248, 0.12) 0%, transparent 50%),
        linear-gradient(145deg, #051624 0%, #030d17 60%, #02070d 100%);
    z-index: 1;
}
.tpc-ba-after::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(56, 189, 248, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

/* CARDS: Pinned Physically to Left and Right sides */
.tpc-ba-card {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: min(440px, 92%);
    max-width: 440px;
    box-sizing: border-box;
    padding: 1.85rem 1.65rem;
    border-radius: 18px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    pointer-events: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Physical Left Card (Before) */
.tpc-ba-card-before {
    left: clamp(1.25rem, 3.5vw, 2.75rem);
    right: auto;
    background: rgba(22, 13, 20, 0.82);
    border: 1px solid rgba(239, 68, 68, 0.35);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(239, 68, 68, 0.15);
}

/* Physical Right Card (After) */
.tpc-ba-card-after {
    right: clamp(1.25rem, 3.5vw, 2.75rem);
    left: auto;
    background: rgba(5, 22, 32, 0.82);
    border: 1px solid rgba(16, 185, 129, 0.35);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 35px rgba(16, 185, 129, 0.18);
}

/* Bidi internal card typography */
html[dir="rtl"] .tpc-ba-card {
    direction: rtl;
    text-align: right;
}
html[dir="ltr"] .tpc-ba-card {
    direction: ltr;
    text-align: left;
}

/* Status Pill */
.tpc-ba-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.38rem 0.95rem;
    border-radius: var(--r-full, 9999px);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 1.15rem;
}
.tpc-ba-pill-bad {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.32);
    color: #f87171;
}
.tpc-ba-pill-good {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
}

/* Performance Score Gauge Box */
.tpc-ba-score-box {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    margin-bottom: 1.25rem;
    padding: 0.95rem 1.15rem;
    background: rgba(2, 6, 23, 0.45);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.tpc-ba-score-num {
    font-size: 2.35rem;
    font-weight: 900;
    line-height: 1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, sans-serif;
    letter-spacing: -0.03em;
    display: inline-flex;
    align-items: baseline;
    direction: ltr !important;
    unicode-bidi: isolate;
}
.tpc-ba-score-num span {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    margin-inline-start: 2px;
}
.tpc-ba-score-num.bad {
    color: #ef4444;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.45);
}
.tpc-ba-score-num.good {
    color: #10b981;
    text-shadow: 0 0 22px rgba(16, 185, 129, 0.55);
}

.tpc-ba-score-meta {
    flex: 1;
    min-width: 0;
}
.tpc-ba-score-meta strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 0.45rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tpc-ba-meter-track {
    width: 100%;
    height: 7px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    overflow: hidden;
    direction: ltr; /* Fills smoothly */
}
.tpc-ba-meter-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.tpc-ba-meter-fill.bad {
    background: linear-gradient(90deg, #ef4444, #dc2626);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}
.tpc-ba-meter-fill.good {
    background: linear-gradient(90deg, #10b981, #06b6d4);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.7);
}

/* Telemetry List */
.tpc-ba-telemetry-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 1.25rem;
}
.tpc-ba-telemetry-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.85rem;
    border-radius: 10px;
    font-size: 0.82rem;
    transition: background 0.2s ease;
}
.tpc-ba-telemetry-row .t-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #cbd5e1;
    font-weight: 500;
}
.tpc-ba-telemetry-row .t-label i {
    font-size: 0.85rem;
    opacity: 0.85;
}
.tpc-ba-telemetry-row .t-val {
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.82rem;
    direction: ltr !important;
    unicode-bidi: isolate;
    display: inline-block;
}

/* Row Bad State */
.tpc-ba-telemetry-row.bad {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.16);
}
.tpc-ba-telemetry-row.bad .t-val {
    color: #f87171;
}

/* Row Good State */
.tpc-ba-telemetry-row.good {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.18);
}
.tpc-ba-telemetry-row.good .t-val {
    color: #34d399;
}

/* Status Footer Notice */
.tpc-ba-status-footer {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.78rem;
    line-height: 1.45;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.tpc-ba-status-footer i {
    font-size: 0.95rem;
    flex-shrink: 0;
}
.tpc-ba-status-footer.bad {
    color: #fca5a5;
}
.tpc-ba-status-footer.bad i {
    color: #ef4444;
}
.tpc-ba-status-footer.good {
    color: #6ee7b7;
}
.tpc-ba-status-footer.good i {
    color: #10b981;
}

/* Draggable Central Handle & Button */
.tpc-ba-slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: linear-gradient(180deg, #38bdf8 0%, #2563eb 50%, #38bdf8 100%);
    cursor: ew-resize;
    z-index: 10;
    transform: translateX(-50%);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.9), 0 0 10px rgba(56, 189, 248, 0.6);
    touch-action: none;
    transition: box-shadow 0.2s ease;
}
.tpc-ba-slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    border: 3px solid #ffffff;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 4px 22px rgba(0, 0, 0, 0.6), 0 0 25px rgba(56, 189, 248, 0.85);
    cursor: grab;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}
.tpc-ba-slider-button * {
    pointer-events: none;
}
.tpc-ba-slider-button:hover,
.tpc-ba-slider-handle:hover .tpc-ba-slider-button,
.tpc-ba-container.is-dragging .tpc-ba-slider-button {
    transform: translate(-50%, -50%) scale(1.18);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.8), 0 0 35px rgba(56, 189, 248, 1);
    cursor: grabbing;
}
.tpc-ba-slider-handle:focus-visible {
    outline: none;
}
.tpc-ba-slider-handle:focus-visible .tpc-ba-slider-button {
    outline: 3px solid #38bdf8;
    outline-offset: 4px;
}
.tpc-ba-container.is-dragging {
    cursor: grabbing !important;
}
.tpc-ba-container.is-dragging * {
    user-select: none !important;
    -webkit-user-select: none !important;
}

/* Supporting KPI Cards Grid */
.tpc-ba-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    max-width: 1040px;
    margin: 2.25rem auto 0;
}
.tpc-ba-kpi-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 1.5rem 1.25rem;
    text-align: center;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.tpc-ba-kpi-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.08) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.tpc-ba-kpi-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.45), 0 0 25px rgba(56, 189, 248, 0.12);
}
.tpc-ba-kpi-card:hover::before {
    opacity: 1;
}
.tpc-ba-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0.95rem;
    transition: transform 0.3s ease;
}
.tpc-ba-kpi-card:hover .tpc-ba-kpi-icon {
    transform: scale(1.12);
}
.tpc-ba-kpi-value {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
    line-height: 1.25;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    direction: ltr !important;
    unicode-bidi: isolate;
}
.tpc-ba-kpi-label {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.5;
}

/* Responsive Adaptations */
@media (max-width: 1024px) {
    .tpc-ba-container {
        min-height: 560px;
    }
    .tpc-ba-card {
        width: 360px;
        max-width: 360px;
        padding: 1.4rem 1.2rem;
    }
    .tpc-ba-score-num {
        font-size: 2rem;
    }
    .tpc-ba-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .tpc-transformation-section {
        padding-top: 3.5rem;
        padding-bottom: 4rem;
    }
    .tpc-ba-window-bar {
        height: 40px;
        padding: 0 0.85rem;
    }
    .tpc-ba-url-bar {
        max-width: 70%;
        font-size: 0.68rem;
    }
    .tpc-ba-container {
        min-height: 520px;
    }
    .tpc-ba-card {
        width: min(320px, 86%);
        max-width: 320px;
        padding: 1.25rem 1rem;
    }
    .tpc-ba-card-before {
        left: 0.75rem;
    }
    .tpc-ba-card-after {
        right: 0.75rem;
    }
    .tpc-ba-score-box {
        padding: 0.75rem 0.85rem;
        gap: 0.85rem;
        margin-bottom: 0.95rem;
    }
    .tpc-ba-score-num {
        font-size: 1.85rem;
    }
    .tpc-ba-telemetry-row {
        padding: 0.48rem 0.7rem;
        font-size: 0.76rem;
    }
    .tpc-ba-slider-button {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    .tpc-ba-kpi-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
    .tpc-ba-kpi-card {
        padding: 1.25rem 1rem;
    }
}


/* ═══════════════════════════════════════════════════════
   29. AI PROJECT ARCHITECT & BLUEPRINT GENERATOR
═══════════════════════════════════════════════════════ */
.tpc-architect-box {
    background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.12) 0%, rgba(15, 23, 42, 0.95) 70%);
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: var(--r-xl);
    padding: clamp(1.5rem, 4vw, 2.75rem);
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(139, 92, 246, 0.15);
}
.tpc-arch-stepper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}
.tpc-arch-select-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--r-md);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
}
.tpc-arch-select-card:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: var(--c-secondary);
    transform: translateY(-2px);
}
.tpc-arch-select-card.selected {
    background: rgba(139, 92, 246, 0.18);
    border-color: #a855f7;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
}

.tpc-blueprint-card {
    background: rgba(10, 15, 29, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--r-lg);
    padding: 1.5rem;
    margin-top: 1.5rem;
    display: none;
    animation: tpc-fade-in 0.4s ease forwards;
}
.tpc-blueprint-card.active { display: block; }
.tpc-bp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}
.tpc-bp-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--r-sm);
    padding: 0.85rem;
}
.tpc-bp-item .label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin-bottom: 0.35rem;
    display: block;
}
.tpc-bp-item .val {
    font-size: 0.92rem;
    font-weight: 700;
    color: #60a5fa;
}

/* The cost estimator moved to the tools hub; its rules went with it. */

/* ═══════════════════════════════════════════════════════
   40. CONSULTATION BOOKING WIDGET
═══════════════════════════════════════════════════════ */
.tpc-booking-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 768px) { .tpc-booking-grid { grid-template-columns: 1fr; } }
.tpc-calendar-box {
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--r-xl); padding: 1.5rem; overflow: hidden;
}
.tpc-cal-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1rem;
}
.tpc-cal-header h4 { color: #fff; font-size: 1rem; margin: 0; }
.tpc-cal-header button {
    background: none; border: none; color: var(--c-text-muted);
    cursor: pointer; font-size: 1rem; padding: 0.25rem;
}
.tpc-cal-header button:hover { color: var(--c-primary); }
html[dir="rtl"] #tpc-cal-prev i,
html[dir="rtl"] #tpc-cal-next i { transform: scaleX(-1); }
html[dir="ltr"] #tpc-cal-prev i,
html[dir="ltr"] #tpc-cal-next i { transform: none; }
.tpc-cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 0.35rem; }
.tpc-cal-weekdays span { text-align: center; font-size: 0.7rem; color: var(--c-text-dim); font-weight: 600; padding: 0.35rem 0; }
.tpc-cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.tpc-cal-day {
    text-align: center; padding: 0.55rem 0; font-size: 0.82rem;
    border-radius: var(--r-sm); cursor: pointer; color: var(--c-text);
    transition: all 0.2s; background: transparent; border: none;
    font-weight: 500;
}
.tpc-cal-day:hover { background: rgba(59,130,246,0.15); color: #fff; }
.tpc-cal-day.disabled { opacity: 0.25; pointer-events: none; }
.tpc-cal-day.selected { background: var(--c-primary); color: #fff; font-weight: 700; box-shadow: 0 0 12px rgba(59,130,246,0.4); }
.tpc-cal-day.today { border: 1px solid var(--c-primary); }

.tpc-time-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-top: 1rem; }
@media (max-width: 600px) { .tpc-time-slots { grid-template-columns: repeat(2, 1fr); } }
.tpc-time-slot {
    background: var(--c-surface-2); border: 1px solid var(--c-border);
    border-radius: var(--r-sm); padding: 0.6rem; text-align: center;
    font-size: 0.82rem; color: var(--c-text-muted); cursor: pointer;
    transition: all 0.2s; font-weight: 500;
}
.tpc-time-slot:hover { border-color: var(--c-primary); color: #fff; }
.tpc-time-slot.selected { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

.tpc-booking-info {
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--r-xl); padding: 2rem; display: flex; flex-direction: column; gap: 1.25rem;
}
.tpc-booking-info h4 { color: #fff; font-size: 1.05rem; margin: 0; }
.tpc-booking-detail {
    display: flex; align-items: center; gap: 0.65rem;
    font-size: 0.85rem; color: var(--c-text-muted);
}
.tpc-booking-detail i { color: var(--c-primary); width: 18px; text-align: center; }



/* ════════════════════
   SERVICES FILTER & friends — moved out of the inline <style> block
   that front-page.php used to emit on every request.
════════════════════ */
.tpc-services-filter-tabs {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 0.65rem;
            flex-wrap: wrap;
            margin-bottom: 2.5rem;
        }
        .tpc-filter-btn {
            background: rgba(15, 23, 42, 0.75);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #94a3b8;
            padding: 0.65rem 1.35rem;
            border-radius: var(--r-full);
            font-size: 0.88rem;
            font-weight: 600;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 0.55rem;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            backdrop-filter: blur(12px);
        }
        .tpc-filter-btn:hover {
            color: #fff;
            border-color: rgba(59, 130, 246, 0.4);
            background: rgba(30, 41, 59, 0.85);
            transform: translateY(-2px);
        }
        .tpc-filter-btn.active {
            background: linear-gradient(135deg, var(--c-primary, #3b82f6), #1d4ed8);
            color: #ffffff;
            border-color: transparent;
            box-shadow: 0 8px 24px -4px rgba(59, 130, 246, 0.5);
        }
        .tpc-filter-count {
            background: rgba(255, 255, 255, 0.2);
            font-size: 0.72rem;
            padding: 0.1rem 0.5rem;
            border-radius: 20px;
            margin-inline-start: 0.2rem;
        }

        .tpc-card-top-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            margin-bottom: 1.25rem;
            width: 100%;
        }

        .tpc-card-cat-badge {
            font-size: 0.74rem;
            font-weight: 700;
            padding: 0.32rem 0.85rem;
            border-radius: var(--r-full);
            letter-spacing: 0.02em;
            backdrop-filter: blur(8px);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 65%;
            display: inline-flex;
            align-items: center;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }

        .tpc-flip-card .card-icon {
            width: 48px;
            height: 48px;
            border-radius: 14px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            margin: 0;
            flex-shrink: 0;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
            transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
        }

        .tpc-flip-card-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
            gap: 1.5rem;
            transition: all 0.4s ease;
        }
        .tpc-flip-card {
            background-color: #0f172a;
            position: relative;
            width: 100%;
            height: 380px;
            border-radius: var(--r-lg) !important;
            border: 1px solid rgba(255, 255, 255, 0.08);
            transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease, opacity 0.35s ease;
            cursor: pointer;
            user-select: none;
            overflow: hidden;
        }

        .tpc-flip-card.tpc-service-hidden {
            display: none !important;
        }

        .tpc-flip-card:hover,
        .tpc-flip-card.is-flipped {
            transform: translateY(-6px);
            border-color: var(--card-color, var(--c-primary)) !important;
            box-shadow: 0 14px 35px -10px var(--card-color, rgba(59, 130, 246, 0.4)), var(--shadow-card);
        }

        .tpc-flip-card-inner {
            position: relative;
            width: 100%;
            height: 100%;
        }
        
        .tpc-flip-card .card.card-service {
            transform: none !important;
            box-shadow: none !important;
            padding: 1.6rem !important;
        }
        
        .tpc-flip-card .card::before {
            display: none !important;
        }
        
        .tpc-flip-card-front, .tpc-flip-card-back {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            border-radius: var(--r-lg) !important;
            margin: 0 !important;
            box-sizing: border-box;
        }
        
        .tpc-flip-card-front {
            background: #0f172a;
            opacity: 1;
            transform: scale(1) translateY(0);
            transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
            z-index: 2;
            pointer-events: auto;
            padding: 1.6rem !important;
        }
        
        .tpc-flip-card-back {
            background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), #080c14);
            opacity: 0;
            transform: scale(1.05) translateY(10px);
            transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
            z-index: 1;
            pointer-events: none;
        }
        
        .tpc-flip-card:hover .tpc-flip-card-front,
        .tpc-flip-card.is-flipped .tpc-flip-card-front {
            opacity: 0;
            transform: scale(0.94) translateY(-10px);
            z-index: 1;
            pointer-events: none;
        }
        
        .tpc-flip-card:hover .tpc-flip-card-back,
        .tpc-flip-card.is-flipped .tpc-flip-card-back {
            opacity: 1;
            transform: scale(1) translateY(0);
            z-index: 2;
            pointer-events: auto;
        }

        .tpc-flip-card:hover .card-icon,
        .tpc-flip-card.is-flipped .card-icon {
            transform: scale(1.1) rotate(4deg);
        }

        /* Back Face Styles */
        .card-back-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.85rem;
            padding-bottom: 0.65rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        .card-back-title {
            display: flex;
            align-items: center;
            gap: 0.6rem;
        }
        .card-back-title i {
            font-size: 1.1rem;
        }
        .card-back-title h4 {
            color: #ffffff;
            font-size: 1.05rem;
            font-weight: 700;
            margin: 0;
        }
        .card-flip-btn {
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.15);
            color: #cbd5e1;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .card-flip-btn:hover {
            background: rgba(255, 255, 255, 0.2);
            color: #fff;
            transform: rotate(-180deg);
        }

        .card-features-list {
            list-style: none;
            padding: 0;
            margin: 0 0 1.25rem 0;
            display: flex;
            flex-direction: column;
            gap: 0.65rem;
            flex-grow: 1;
        }
        .card-features-list li {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            color: #cbd5e1;
            font-size: 0.82rem;
            line-height: 1.4;
        }
        .card-features-list li i {
            font-size: 0.85rem;
            flex-shrink: 0;
        }

        .card-back-footer {
            margin-top: auto;
        }
        .btn-service-cta {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            width: 100%;
            padding: 0.7rem 1rem;
            border-radius: var(--r-full);
            color: #ffffff;
            font-size: 0.85rem;
            font-weight: 700;
            text-decoration: none;
            transition: all var(--t-base);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        }
        .btn-service-cta:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px -4px var(--card-color, rgba(59, 130, 246, 0.6));
            color: #fff;
        }

        /* Action Bar Styles */
        .tpc-services-actions {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.85rem;
            margin-top: 3rem;
        }
        .tpc-toggle-services-btn {
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
            border: 1px solid rgba(59, 130, 246, 0.4);
            color: #fff !important;
            padding: 0.85rem 2.25rem;
            font-size: 0.95rem;
            font-weight: 700;
            border-radius: var(--r-full);
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 0.75rem;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.2);
        }
        .tpc-toggle-services-btn:hover {
            background: linear-gradient(135deg, var(--c-primary), #2563eb);
            border-color: transparent;
            transform: translateY(-3px);
            box-shadow: 0 15px 30px -5px rgba(59, 130, 246, 0.4);
        }
        .tpc-services-counter {
            font-size: 0.85rem;
            color: #94a3b8;
            font-weight: 500;
            background: rgba(15, 23, 42, 0.6);
            padding: 0.35rem 1rem;
            border-radius: 20px;
            border: 1px solid rgba(255, 255, 255, 0.05);
        }
