/* ==========================================================
 * Nestrohub AI Material Sourcing - Full CSS System
 * Core Theme: Dark Luxury Architecture
 * ========================================================== */

:root {
    --nh-bg: #020617;
    --nh-surface: #0F172A;
    --nh-card: #1E293B;
    --nh-primary: #2563EB;
    --nh-primary-hover: #1d4ed8;
    --nh-border: rgba(255, 255, 255, 0.08);
    --nh-muted: #94a3b8;
    --nh-cyan: #38bdf8;
    --nh-gold: #fbbf24;
    --nh-text-success: #22c55e;
    --nh-text-danger: #ef4444;
}

/* Base Typo & Body */
.nh-ai-page { position: relative; overflow-x: hidden; background-color: var(--nh-bg); color: #f8fafc; font-family: 'Poppins', sans-serif; }
.nh-container { width: 100%; max-width: 1400px; margin: auto; padding: 0 24px; }
.nh-ai-section { padding: 100px 0; position: relative; z-index: 1; }
.nh-bg-alternate { background-color: var(--nh-surface); border-top: 1px solid var(--nh-border); border-bottom: 1px solid var(--nh-border); }

/* Global UI Components */
.nh-card { background: var(--nh-card); border: 1px solid var(--nh-border); border-radius: 24px; transition: .35s ease; }
.nh-glass { background: rgba(30, 41, 59, 0.7); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.nh-gradient-border { position: relative; }
.nh-gradient-border::before { content: ""; position: absolute; inset: -2px; border-radius: 26px; padding: 2px; background: linear-gradient(45deg, var(--nh-primary), var(--nh-cyan), transparent); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; z-index: -1; }
.nh-hover-lift:hover { transform: translateY(-8px); border-color: var(--nh-primary); box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 20px rgba(37,99,235,0.1); }

h1, h2, .nh-hero-title, .nh-section-title, .nh-card-title, .nh-stat-number, .trust-percent { font-family: 'Playfair Display', serif; }
.nh-section-header-center { text-align: center; margin-bottom: 70px; display: flex; flex-direction: column; align-items: center; }
.nh-super-title { font-size: 0.85rem; font-weight: 700; color: var(--nh-cyan); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 12px; }
.nh-section-title { font-size: 52px; font-weight: 800; color: #ffffff; margin: 0 0 16px; }
.nh-section-desc { max-width: 700px; margin: 0 auto; font-size: 1.1rem; color: var(--nh-muted); line-height: 1.6; text-align: center; }

/* Buttons & Badges */
.nh-btn-primary { background: var(--nh-primary); color: #fff; padding: 16px 38px; border-radius: 50px; font-weight: 700; display: inline-flex; justify-content: center; align-items: center; text-decoration: none; transition: 0.3s ease; border: none; }
.nh-btn-primary:hover { background: var(--nh-primary-hover); transform: translateY(-2px); color: #fff; box-shadow: 0 10px 25px rgba(37,99,235,0.3); }
.nh-btn-outline { border: 1px solid var(--nh-primary); color: #fff; background: transparent; padding: 16px 38px; border-radius: 50px; font-weight: 700; display: inline-flex; justify-content: center; align-items: center; text-decoration: none; transition: 0.3s ease; }
.nh-btn-outline:hover { background: var(--nh-primary); color: #fff; }
.nh-badge { padding: 4px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; }
.nh-badge-outline { border: 1px solid var(--nh-border); color: var(--nh-muted); }
.nh-badge-primary { background: rgba(37,99,235,0.2); color: var(--nh-cyan); border: 1px solid var(--nh-primary); }
.nh-badge-success { background: rgba(34,197,94,0.2); color: var(--nh-text-success); }

/* Utilities */
.nh-text-primary { color: var(--nh-primary) !important; }
.nh-text-success { color: var(--nh-text-success) !important; }
.nh-text-danger { color: var(--nh-text-danger) !important; }
.fw-bold { font-weight: bold; }
.mt-4 { margin-top: 1.5rem; }
.nh-mb-0 { margin-bottom: 0 !important; }

/* Global Animations */
.animate-fade-up { opacity: 0; transform: translateY(40px); transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.animate-fade-up.is-visible { opacity: 1; transform: translateY(0); }
@keyframes pulseGlow { 0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); } 70% { box-shadow: 0 0 0 20px rgba(37, 99, 235, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); } }
.nh-pulse-glow { animation: pulseGlow 2s infinite; border-radius: 50%; }

/* Ambient Backgrounds */
.nh-ambient-glow { position: absolute; width: 600px; height: 600px; background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%); filter: blur(100px); z-index: 0; pointer-events: none; }
.glow-top-left { top: -100px; left: -200px; }
.glow-center-right { top: 30%; right: -200px; }
.glow-bottom-left { bottom: 10%; left: -200px; }
.nh-grid-overlay { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px); background-size: 50px 50px; z-index: 0; pointer-events: none; }

/* 1. HERO SECTION */
.nh-hero-split-section { padding: 180px 0 120px; border-bottom: 1px solid var(--nh-border); }
.nh-hero-split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center; position: relative; z-index: 2; }
.nh-hero-title { font-size: 64px; font-weight: 800; line-height: 1.15; margin-bottom: 24px; }
.nh-hero-desc { font-size: 1.2rem; color: var(--nh-muted); margin-bottom: 40px; }
.nh-trust-pills { display: flex; gap: 12px; margin-bottom: 30px; }
.nh-pill { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--nh-border); padding: 8px 18px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; color: var(--nh-cyan); display: inline-flex; align-items: center; gap: 8px; }
.nh-hero-actions { display: flex; gap: 16px; }

/* Hero Visual Flow */
.nh-hero-visual-card { padding: 50px; display: flex; flex-direction: column; align-items: center; border: 1px solid rgba(37,99,235,0.3); }
.nh-visual-flow { display: flex; flex-direction: column; align-items: center; gap: 15px; width: 100%; }
.nh-flow-node { width: 100%; background: var(--nh-surface); border: 1px solid var(--nh-border); padding: 20px; border-radius: 16px; display: flex; align-items: center; gap: 16px; font-size: 1.1rem; font-weight: 600; transition: 0.3s; }
.nh-flow-node i { font-size: 1.5rem; color: var(--nh-cyan); }
.nh-active-node { border-color: var(--nh-primary); background: rgba(37,99,235,0.1); border-radius: 16px; } /* Override pulse-glow radius */
.nh-active-node i { color: var(--nh-primary); }
.nh-flow-arrow { font-size: 1.8rem; color: var(--nh-primary); }

/* 2. STATS */
.nh-stats-section { padding: 0 0 100px; margin-top: -50px; z-index: 10; }
.nh-hero-stats { display: flex; justify-content: space-evenly; align-items: center; padding: 40px; border: 1px solid rgba(255,255,255,0.1); }
.nh-stat-item { display: flex; flex-direction: column; align-items: center; }
.nh-stat-number { font-size: 48px; font-weight: 800; line-height: 1; margin-bottom: 8px; }
.nh-stat-label { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--nh-muted); }
.nh-stat-divider { width: 1px; height: 60px; background: var(--nh-border); }

/* 3. WORKFLOW */
.nh-workflow-timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 30px; position: relative; margin-top: 60px; }
.nh-workflow-connector { position: absolute; top: 70px; left: 10%; right: 10%; height: 2px; background: var(--nh-border); z-index: 0; }
.nh-workflow-card { padding: 40px 30px; position: relative; z-index: 1; background: var(--nh-card); }
.nh-workflow-number { position: absolute; top: 15px; right: 20px; font-size: 54px; font-family: 'Playfair Display', serif; color: rgba(255,255,255,0.05); font-weight: 800; }
.nh-workflow-icon { width: 64px; height: 64px; border-radius: 18px; background: rgba(37,99,235,0.1); color: var(--nh-primary); display: flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 25px; border: 1px solid var(--nh-bg); }
.nh-active-icon { background: var(--nh-primary); color: #fff; box-shadow: 0 0 20px rgba(37,99,235,0.4); }

/* 4. BENEFITS */
.nh-benefits-split { display: grid; grid-template-columns: 1fr 1.5fr; gap: 80px; align-items: center; }
.nh-benefits-visual { display: flex; justify-content: center; }
.nh-trust-shield { width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle at top, rgba(37,99,235,0.25), transparent 70%); border: 2px solid rgba(37,99,235,0.45); display: flex; flex-direction: column; justify-content: center; align-items: center; font-size: 80px; color: var(--nh-primary); }
.nh-trust-list { list-style: none; padding: 0; margin-top: 30px; }
.nh-trust-list li { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 25px; font-size: 1.1rem; line-height: 1.6; }
.nh-trust-list i { color: var(--nh-text-success); font-size: 1.4rem; margin-top: 2px; }
.nh-trust-list strong { color: #fff; margin-right: 5px; }

/* 5. CATEGORIES */
.nh-category-grid-16 { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
.nh-mini-cat-card { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 20px; text-decoration: none; color: #fff; }
.nh-cat-icon-small { font-size: 2.5rem; color: var(--nh-cyan); margin-bottom: 15px; transition: 0.3s; }
.nh-mini-cat-card h4 { font-family: 'Poppins', sans-serif; font-size: 1.1rem; font-weight: 600; margin: 0 0 10px; }

/* 6. SUPPLIERS */
.nh-supplier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 30px; }
.nh-supplier-card { padding: 30px; }
.nh-supplier-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--nh-border); padding-bottom: 20px; }
.nh-supplier-logo { width: 50px; height: 50px; border-radius: 12px; object-fit: cover; }
.nh-stars { color: var(--nh-gold); font-size: 1.1rem; letter-spacing: 2px; }
.nh-supplier-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.nh-metric-val { font-size: 1.2rem; font-weight: 700; color: #fff; display: block; }
.nh-metric-lbl { font-size: 0.85rem; color: var(--nh-muted); text-transform: uppercase; }

/* 7 & 8. GRIDS & TABLES */
.nh-grid-60-40 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; }
.nh-grid-50-50 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.nh-price-compare { padding: 40px; }
.nh-custom-table { width: 100%; border-collapse: collapse; }
.nh-custom-table th { text-align: left; padding: 16px; color: var(--nh-cyan); font-weight: 600; border-bottom: 1px solid var(--nh-border); text-transform: uppercase; font-size: 0.9rem; }
.nh-custom-table td { padding: 16px; color: #fff; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 1.05rem; }
.nh-table-winner { background: rgba(37,99,235,0.05); border-radius: 12px; }

/* AI Recommendation Card */
.nh-recommendation-card { padding: 50px 40px; display: flex; flex-direction: column; position: relative; }
.nh-compare-badge { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); background: var(--nh-primary); color: #fff; padding: 6px 20px; border-radius: 999px; font-weight: 700; text-transform: uppercase; }
.nh-compare-list { list-style: none; padding: 0; margin: 20px 0; }
.nh-compare-list li { padding: 12px 0; border-bottom: 1px solid var(--nh-border); display: flex; gap: 12px; font-size: 1.1rem; color: #cbd5e1; }
.nh-confidence-meter { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.3); border-radius: 16px; padding: 16px; display: flex; justify-content: space-between; align-items: center; color: var(--nh-text-success); }
.nh-confidence-meter strong { font-size: 1.5rem; font-weight: 800; font-family: 'Playfair Display', serif; }

/* 9 & 10. GRAPH & ALTERNATIVES */
.nh-prediction-card { padding: 40px; }
.nh-svg-graph-container { background: var(--nh-surface); border: 1px solid var(--nh-border); border-radius: 16px; padding: 20px; }
.nh-svg-graph { width: 100%; height: auto; display: block; overflow: visible; }
.nh-graph-path { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: dash 2s ease-out forwards; }
@keyframes dash { to { stroke-dashoffset: 0; } }

.nh-alt-card { padding: 40px; }
.nh-alt-compare { background: var(--nh-surface); border-radius: 16px; border: 1px solid var(--nh-border); }
.nh-alt-item { padding: 24px; display: flex; justify-content: space-between; align-items: center; }
.nh-alt-label { font-weight: 600; color: #fff; font-size: 1.1rem; margin-bottom: 4px; }
.nh-alt-price { color: var(--nh-muted); }
.nh-alt-divider { height: 1px; background: var(--nh-border); position: relative; display: flex; justify-content: center; align-items: center; }
.nh-alt-divider i { position: absolute; font-size: 1.8rem; background: var(--nh-surface); padding: 0 10px; }
.nh-alt-winner { background: rgba(34, 197, 94, 0.05); }

/* 11. QUALITY */
.nh-quality-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.nh-quality-card { padding: 40px 30px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.nh-quality-card i { font-size: 3rem; color: var(--nh-cyan); margin-bottom: 20px; transition: 0.3s; }
.nh-quality-card:hover i { transform: scale(1.1); color: var(--nh-primary); }
.nh-quality-card h4 { font-family: 'Poppins', sans-serif; font-size: 1.1rem; margin: 0; }

/* 12. DELIVERY (Animated CSS) */
.nh-delivery-wrapper { padding: 60px 40px; overflow: hidden; position: relative; }
.nh-delivery-track { position: absolute; top: 85px; left: 10%; right: 10%; height: 4px; background: var(--nh-border); border-radius: 2px; }
.nh-delivery-progress { position: absolute; top: 0; left: 0; height: 100%; background: var(--nh-primary); width: 0; transition: width 2s ease-in-out; }
.nh-delivery-truck { position: absolute; top: -16px; left: 0; font-size: 24px; color: var(--nh-primary); transition: left 2s ease-in-out; }
.nh-delivery-steps { display: flex; justify-content: space-between; position: relative; z-index: 2; padding: 0 5%; }
.nh-del-step { display: flex; flex-direction: column; align-items: center; gap: 16px; background: var(--nh-card); padding: 0 10px; }
.nh-del-step i { width: 60px; height: 60px; border-radius: 50%; background: var(--nh-surface); border: 2px solid var(--nh-border); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--nh-muted); }
.nh-del-step span { font-weight: 600; color: var(--nh-muted); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 1px; }
.nh-del-done i { border-color: var(--nh-primary); background: var(--nh-primary); color: #fff; }
.nh-del-active i { border-color: var(--nh-primary); color: var(--nh-primary); box-shadow: 0 0 15px rgba(37,99,235,0.4); }
.start-animation .nh-delivery-progress { width: 50%; } /* Animates to midway */
.start-animation .nh-delivery-truck { left: 50%; transform: translateX(-50%); }

/* 13. TESTIMONIALS */
.nh-testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 30px; }
.nh-testimonial-card { padding: 40px; position: relative; }
.nh-quote-icon { position: absolute; top: 30px; right: 30px; font-size: 3rem; color: rgba(255,255,255,0.05); }
.nh-stars { color: var(--nh-gold); font-size: 1.2rem; letter-spacing: 3px; margin-bottom: 20px; }
.nh-review-text { font-size: 1.15rem; font-style: italic; color: #e2e8f0; line-height: 1.8; }
.nh-reviewer-profile { display: flex; align-items: center; gap: 16px; }
.nh-avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; border: 2px solid var(--nh-primary); }
.nh-reviewer-name { margin: 0 0 4px; font-size: 1.1rem; color: #fff; font-weight: 700; }
.nh-reviewer-role { font-size: 0.9rem; color: var(--nh-muted); }

/* 14. FAQ ACCORDION */
.nh-faq-list { max-width: 900px; margin: 0 auto; }
.nh-faq-item { margin-bottom: 18px; overflow: hidden; padding: 0; }
.nh-faq-question { width: 100%; background: none; border: 0; color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 26px 30px; cursor: pointer; font-size: 1.15rem; font-weight: 600; font-family: 'Poppins', sans-serif; transition: 0.3s; }
.nh-faq-question:hover { color: var(--nh-primary); }
.nh-faq-icon { font-size: 1.8rem; color: var(--nh-primary); transition: .3s; }
.nh-faq-answer { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.nh-faq-answer-inner { padding: 0 30px 30px; color: var(--nh-muted); line-height: 1.8; font-size: 1.05rem; }
.nh-faq-item.active .nh-faq-answer { max-height: 300px; }
.nh-faq-item.active .nh-faq-icon { transform: rotate(45deg); }
.nh-faq-item.active { border-color: var(--nh-primary); background: rgba(37, 99, 235, 0.03); }

/* 15. CTA */
.nh-cta-box { text-align: center; padding: 80px 40px; position: relative; overflow: hidden; border: 1px solid rgba(37,99,235,0.3); }
.nh-cta-actions { display: flex; justify-content: center; gap: 20px; margin: 40px 0 0; }

/* 16. RELATED AI */
.nh-related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.nh-related-card { padding: 30px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; text-decoration: none !important; }
.nh-related-card i:first-child { font-size: 2.5rem; color: var(--nh-cyan); margin-bottom: 16px; transition: 0.3s; }
.nh-related-card h4 { color: #fff; font-family: 'Poppins', sans-serif; font-weight: 600; margin: 0; }
.nh-related-arrow { position: absolute; bottom: 30px; right: 30px; font-size: 1.5rem; color: var(--nh-primary); transform: translateX(-20px); opacity: 0; transition: 0.3s; }
.nh-related-card:hover i:first-child { transform: translateY(-5px); color: var(--nh-primary); }
.nh-related-card:hover .nh-related-arrow { transform: translateX(0); opacity: 1; }

/* ==========================================================
 * RESPONSIVE BREAKPOINTS
 * ========================================================== */
@media (max-width: 1200px) {
    .nh-hero-split { grid-template-columns: 1fr; text-align: center; }
    .nh-text-left { text-align: center !important; }
    .nh-left-align { justify-content: center !important; }
    .nh-hero-visual-card { max-width: 600px; margin: 0 auto; }
    .nh-workflow-connector { display: none; }
    .nh-workflow-timeline { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .nh-grid-60-40, .nh-grid-50-50 { grid-template-columns: 1fr; }
}

@media (max-width: 992px) {
    .nh-section-header-center .nh-section-title { font-size: 42px; }
    .nh-hero-title { font-size: 52px; }
    .nh-benefits-split { grid-template-columns: 1fr; text-align: center; }
    .nh-trust-list li { justify-content: center; }
    .nh-stats-section { padding: 0 0 80px; }
    .nh-hero-stats { grid-template-columns: repeat(2, 1fr); display: grid; gap: 30px; padding: 30px; }
    .nh-stat-divider { display: none; }
}

@media (max-width: 768px) {
    .nh-ai-section { padding: 80px 0; }
    .nh-hero-split-section { padding: 140px 0 80px; }
    .nh-hero-title { font-size: 40px; }
    .nh-hero-actions, .nh-cta-actions { flex-direction: column; width: 100%; max-width: 350px; margin: 0 auto; gap: 16px; }
    .nh-hero-actions a, .nh-cta-actions a { width: 100%; }
    
    .nh-workflow-timeline { grid-template-columns: repeat(2, 1fr); }
    .nh-category-grid-16 { grid-template-columns: repeat(2, 1fr); }
    
    .nh-delivery-track { display: none; }
    .nh-delivery-steps { flex-direction: column; align-items: flex-start; gap: 30px; padding: 0; }
    .nh-del-step { flex-direction: row; background: transparent; }
}

@media (max-width: 576px) {
    .nh-container { padding: 0 16px; }
    .nh-section-header-center .nh-section-title { font-size: 34px; }
    .nh-hero-title { font-size: 34px; }
    .nh-hero-stats { grid-template-columns: 1fr; }
    .nh-workflow-timeline, .nh-category-grid-16 { grid-template-columns: 1fr; }
    .nh-faq-question { padding: 20px; font-size: 1.05rem; }
    .nh-faq-answer-inner { padding: 0 20px 20px; }
    .nh-svg-graph-container { overflow-x: auto; }
    .nh-svg-graph { min-width: 450px; }
}
