/* ===================================================================
   Refua Ecosystem – Shared Sub-Page Styles
   Reuses refua.css patterns with product-specific accent theming.
   =================================================================== */

/* --- Ecosystem Grid on main Refua page ----------------------------- */
.refua-ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.refua-ecosystem-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 2rem;
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.refua-ecosystem-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
}

.refua-ecosystem-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.refua-ecosystem-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.refua-ecosystem-card-icon.accent-blue { background: rgba(56, 189, 248, 0.12); }
.refua-ecosystem-card-icon.accent-violet { background: rgba(139, 92, 246, 0.12); }
.refua-ecosystem-card-icon.accent-emerald { background: rgba(52, 211, 153, 0.12); }
.refua-ecosystem-card-icon.accent-amber { background: rgba(251, 191, 36, 0.12); }
.refua-ecosystem-card-icon.accent-rose { background: rgba(251, 113, 133, 0.12); }
.refua-ecosystem-card-icon.accent-cyan { background: rgba(34, 211, 238, 0.12); }
.refua-ecosystem-card-icon.accent-orange { background: rgba(251, 146, 60, 0.12); }
.refua-ecosystem-card-icon.accent-indigo { background: rgba(99, 102, 241, 0.12); }
.refua-ecosystem-card-icon.accent-teal { background: rgba(45, 212, 191, 0.12); }

.refua-ecosystem-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.refua-ecosystem-card-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    margin-left: auto;
    flex-shrink: 0;
}

.refua-ecosystem-card-badge.open-source {
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.refua-ecosystem-card p {
    font-size: 0.92rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 1rem;
    flex-grow: 1;
}

.refua-ecosystem-card-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: #0284c7;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
}

.refua-ecosystem-card-link::after {
    content: "→";
    transition: transform 0.2s ease;
}

.refua-ecosystem-card:hover .refua-ecosystem-card-link::after {
    transform: translateX(4px);
}

/* --- Sub-Page Hero (themed per product) ---------------------------- */
.eco-hero {
    color: #f0f9ff;
    padding: 6rem 1.5rem 5rem;
    text-align: center;
}

.eco-hero-inner {
    max-width: 820px;
    margin: 0 auto;
}

.eco-hero-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 999px;
    padding: 0.3rem 1rem;
    margin-bottom: 1.5rem;
}

.eco-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 1.25rem;
    background: linear-gradient(90deg, #ffffff 0%, #7dd3fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.eco-hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #cbd5e1;
    max-width: 720px;
    margin: 0 auto 2.5rem;
}

.eco-hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Hero color themes */
.eco-hero--blue { background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0c4a6e 100%); }
.eco-hero--violet { background: linear-gradient(135deg, #0f172a 0%, #312e81 50%, #4c1d95 100%); }
.eco-hero--emerald { background: linear-gradient(135deg, #0f172a 0%, #064e3b 50%, #065f46 100%); }
.eco-hero--amber { background: linear-gradient(135deg, #0f172a 0%, #78350f 50%, #92400e 100%); }
.eco-hero--rose { background: linear-gradient(135deg, #0f172a 0%, #881337 50%, #9f1239 100%); }
.eco-hero--cyan { background: linear-gradient(135deg, #0f172a 0%, #155e75 50%, #164e63 100%); }
.eco-hero--orange { background: linear-gradient(135deg, #0f172a 0%, #7c2d12 50%, #9a3412 100%); }
.eco-hero--indigo { background: linear-gradient(135deg, #0f172a 0%, #312e81 50%, #3730a3 100%); }
.eco-hero--teal { background: linear-gradient(135deg, #0f172a 0%, #134e4a 50%, #115e59 100%); }

/* --- Sub-Page Sections --------------------------------------------- */
.eco-section {
    padding: 4.5rem 1.5rem;
}

.eco-section-alt {
    background: #f1f5f9;
}

.eco-section-inner {
    max-width: 1060px;
    margin: 0 auto;
}

.eco-section h2 {
    font-size: 2.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 1.25rem;
}

.eco-lead {
    font-size: 1.1rem;
    color: #475569;
    line-height: 1.7;
    max-width: 780px;
    margin-bottom: 2.5rem;
}

.eco-prose p {
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* --- Two-Column Layout --------------------------------------------- */
.eco-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
    margin-top: 1.5rem;
}

/* --- Highlight Box ------------------------------------------------- */
.eco-highlight-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.eco-highlight-box h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 1rem;
}

.eco-highlight-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.eco-highlight-box li {
    position: relative;
    padding: 0.5rem 0 0.5rem 1.4rem;
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.55;
}

.eco-highlight-box li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #38bdf8;
    font-weight: 700;
}

/* --- Feature Grid -------------------------------------------------- */
.eco-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.eco-feature-card {
    background: #ffffff;
    padding: 1.75rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.eco-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.10);
}

.eco-feature-icon {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

.eco-feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5rem;
}

.eco-feature-card p {
    font-size: 0.92rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.eco-feature-card code {
    font-size: 0.85rem;
    background: #f1f5f9;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    color: #0f172a;
}

/* --- Code Sections ------------------------------------------------- */
.eco-code-section {
    margin: 2rem 0;
    background: #ffffff;
    padding: 1.75rem;
    border-radius: 12px;
    border-left: 4px solid #38bdf8;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

.eco-code-section h3 {
    margin: 0 0 1rem;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 700;
}

.eco-code-section pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1.15rem 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0.5rem 0;
}

.eco-code-section code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.88rem;
    line-height: 1.55;
}

.eco-code-section p {
    margin: 0.75rem 0 0.25rem;
    font-size: 0.95rem;
    color: #64748b;
}

/* --- Workflow Steps ------------------------------------------------ */
.eco-workflow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    counter-reset: step-counter;
}

.eco-workflow-step {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.75rem;
    position: relative;
    counter-increment: step-counter;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

.eco-workflow-step::before {
    content: counter(step-counter);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.eco-workflow-step h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5rem;
}

.eco-workflow-step p {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.55;
    margin: 0;
}

/* --- Metrics Banner (reused from refua) ---------------------------- */
.eco-metrics {
    background: #0f172a;
    border-top: 1px solid rgba(56, 189, 248, 0.15);
    border-bottom: 1px solid rgba(56, 189, 248, 0.15);
    padding: 2rem 1.5rem;
}

.eco-metrics-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1.5rem;
    text-align: center;
}

.eco-metric-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #38bdf8;
}

.eco-metric-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #94a3b8;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* --- CTA ----------------------------------------------------------- */
.eco-cta {
    text-align: center;
    padding: 2rem 0 1rem;
}

.eco-cta h2 {
    margin-bottom: 1rem;
}

.eco-cta p {
    font-size: 1.1rem;
    color: #475569;
    max-width: 680px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.eco-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Back Navigation ----------------------------------------------- */
.eco-back-nav {
    padding: 1rem 1.5rem 0;
    max-width: 1060px;
    margin: 0 auto;
}

.eco-back-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: #0284c7;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s ease;
}

.eco-back-link:hover {
    color: #0369a1;
}

.eco-back-link::before {
    content: "←";
}

/* --- Responsive ---------------------------------------------------- */
@media (max-width: 900px) {
    .eco-two-col {
        grid-template-columns: 1fr;
    }

    .refua-ecosystem-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .eco-hero {
        padding: 4rem 1.25rem 3.5rem;
    }

    .eco-hero h1 {
        font-size: 2.5rem;
    }

    .eco-hero-subtitle {
        font-size: 1rem;
    }

    .eco-section {
        padding: 3rem 1.25rem;
    }

    .eco-features-grid {
        grid-template-columns: 1fr;
    }

    .eco-workflow {
        grid-template-columns: 1fr;
    }

    .eco-cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
}
