/* ==========================================================================
   RAKLE DIGITAL ECOSYSTEM — Interactive Diagram, Brand Themes & Components
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Interactive Hub-and-Spoke Ecosystem Diagram (Homepage & Overview)
   -------------------------------------------------------------------------- */
.rk-eco-stage {
    position: relative;
    margin-top: 56px;
}

.rk-eco-diagram {
    position: relative;
    min-height: 640px;
    display: grid;
    grid-template-columns: 1fr 220px 1fr;
    grid-template-rows: repeat(3, auto);
    gap: 28px 40px;
    align-items: center;
}

.rk-eco-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.rk-eco-line {
    fill: none;
    stroke: var(--rk-border-strong);
    stroke-width: 2;
    stroke-dasharray: 6 6;
    transition: stroke 0.35s ease, stroke-width 0.35s ease, opacity 0.35s ease;
}

.rk-eco-line.is-active {
    stroke: var(--line-color, #2563eb);
    stroke-width: 3;
    stroke-dasharray: none;
}

.rk-eco-hub {
    grid-column: 2;
    grid-row: 2;
    justify-self: center;
    z-index: 2;
    width: 176px;
    height: 176px;
    border-radius: 50%;
    background: var(--rk-navy);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 18px;
    box-shadow: 0 24px 60px rgba(11, 17, 32, 0.24), 0 0 0 12px rgba(37, 99, 235, 0.08);
    position: relative;
    transition: transform 0.35s var(--rk-spring);
}

.rk-eco-hub img {
    height: 40px;
    width: auto;
    margin-bottom: 8px;
}

.rk-eco-hub span {
    font-family: var(--rk-font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #93c5fd;
}

.rk-eco-node {
    position: relative;
    z-index: 2;
    background: #ffffff;
    border: 1px solid var(--rk-border);
    border-radius: 20px;
    padding: 22px 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--rk-shadow-sm);
    transition: transform 0.35s var(--rk-ease), box-shadow 0.35s var(--rk-ease), border-color 0.3s ease;
    cursor: pointer;
}

.rk-eco-node:hover,
.rk-eco-node.is-active {
    transform: translateY(-5px);
    box-shadow: var(--rk-shadow-lg);
    border-color: var(--node-accent, var(--rk-blue));
}

.rk-eco-node[data-pos="tl"] { grid-column: 1; grid-row: 1; }
.rk-eco-node[data-pos="ml"] { grid-column: 1; grid-row: 2; }
.rk-eco-node[data-pos="bl"] { grid-column: 1; grid-row: 3; }
.rk-eco-node[data-pos="tr"] { grid-column: 3; grid-row: 1; }
.rk-eco-node[data-pos="mr"] { grid-column: 3; grid-row: 2; }
.rk-eco-node[data-pos="br"] { grid-column: 3; grid-row: 3; }

.rk-brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--rk-font-display);
    font-weight: 800;
    font-size: 17px;
    flex-shrink: 0;
    overflow: hidden;
}

.rk-brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.rk-eco-node-cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--node-accent, var(--rk-blue));
    margin-bottom: 4px;
}

.rk-eco-node h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.rk-eco-node p {
    font-size: 13.5px;
    color: var(--rk-slate);
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   2. Ecosystem Overview Hero & 6-Brand Showcase Grid
   -------------------------------------------------------------------------- */
.rk-eco-hero-collage {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    position: relative;
}

.rk-eco-mini-card {
    background: #ffffff;
    border: 1px solid var(--rk-border);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--rk-shadow-md);
    transition: transform 0.35s var(--rk-ease);
}

.rk-eco-mini-card:hover {
    transform: translateY(-6px);
}

.rk-eco-cards-6 {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 24px;
}

.rk-eco-big-card {
    grid-column: span 6;
    border-radius: 28px;
    padding: 36px;
    border: 1px solid var(--rk-border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    transition: transform 0.4s var(--rk-ease), box-shadow 0.4s var(--rk-ease);
}

.rk-eco-big-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--rk-shadow-lg);
}

.rk-eco-offerings {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rk-eco-offerings span {
    font-size: 12.5px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid currentColor;
    opacity: 0.88;
}

/* --------------------------------------------------------------------------
   3. Individual Brand Page Themes
   -------------------------------------------------------------------------- */
/* Ensure transparent header has crisp white text over dark brand heroes */
body:has(.theme-mokshiq, .theme-easyeye, .theme-darshan) .rk-header:not(.rk-scrolled) .rk-logo,
body:has(.theme-mokshiq, .theme-easyeye, .theme-darshan) .rk-header:not(.rk-scrolled) .rk-nav-link {
    color: #ffffff;
}

body:has(.theme-mokshiq, .theme-easyeye, .theme-darshan) .rk-header:not(.rk-scrolled) .rk-mobile-toggle {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.rk-brand-hero {
    padding: 144px 0 84px;
    position: relative;
    overflow: hidden;
}

/* Mokshiq: Deep Emerald Teal (#012A2B / #023436) + Lime (#D9FF43) */
.theme-mokshiq .rk-brand-hero {
    background: radial-gradient(700px 420px at 85% 20%, rgba(217, 255, 67, 0.14), transparent 60%),
                linear-gradient(135deg, #012a2b 0%, #023436 100%);
    color: #e4eeef;
}
.theme-mokshiq .rk-brand-hero h1,
.theme-mokshiq .rk-brand-hero h2 { color: #ffffff; }
.theme-mokshiq .rk-brand-accent { color: #d9ff43; }
.theme-mokshiq .rk-brand-btn { background: #d9ff43; color: #012a2b; font-weight: 700; }
.theme-mokshiq .rk-brand-btn:hover { background: #e5ff70; color: #012a2b; }

/* EasyEYE: Dark Graphite (#0A0D12 / #111827) + Precision Electric Blue (#38BDF8) */
.theme-easyeye .rk-brand-hero {
    background: radial-gradient(750px 420px at 80% 20%, rgba(56, 189, 248, 0.16), transparent 60%),
                linear-gradient(160deg, #07090d 0%, #111827 100%);
    color: #cbd5e1;
}
.theme-easyeye .rk-brand-hero h1,
.theme-easyeye .rk-brand-hero h2 { color: #ffffff; }
.theme-easyeye .rk-brand-accent { color: #38bdf8; }
.theme-easyeye .rk-brand-btn { background: #0284c7; color: #ffffff; }

/* DivinIQ: Ivory (#FFFDF7), Saffron (#EA580C), Gold (#D97706) & Deep Purple (#4C1D95) */
.theme-diviniq .rk-brand-hero {
    background: radial-gradient(700px 450px at 85% 20%, rgba(234, 88, 12, 0.12), transparent 60%),
                radial-gradient(600px 400px at 15% 80%, rgba(76, 29, 149, 0.08), transparent 60%),
                linear-gradient(180deg, #fffdf7 0%, #fef3c7 100%);
    color: #3b0764;
}
.theme-diviniq .rk-brand-accent { color: #c2410c; }
.theme-diviniq .rk-brand-btn { background: linear-gradient(135deg, #ea580c 0%, #d97706 100%); color: #ffffff; }

/* DivinIQ Store: Warm Ivory, Soft Gold (#B45309), Beige (#FBF7EE) */
.theme-diviniq-store .rk-brand-hero {
    background: radial-gradient(700px 450px at 80% 20%, rgba(180, 83, 9, 0.12), transparent 60%),
                linear-gradient(180deg, #fbf7ee 0%, #f5ebd6 100%);
    color: #451a03;
}
.theme-diviniq-store .rk-brand-accent { color: #b45309; }
.theme-diviniq-store .rk-brand-btn { background: #78350f; color: #ffffff; }

/* Rakle Connect: Crisp White, Deep Slate (#0F172A), Crimson Red (#DC2626) & WhatsApp Green (#16A34A) */
.theme-connect .rk-brand-hero {
    background: radial-gradient(750px 420px at 85% 20%, rgba(220, 38, 38, 0.08), transparent 60%),
                radial-gradient(600px 420px at 15% 80%, rgba(22, 163, 74, 0.07), transparent 60%),
                #ffffff;
    border-bottom: 1px solid var(--rk-border);
}
.theme-connect .rk-brand-accent { color: #dc2626; }
.theme-connect .rk-brand-btn { background: #dc2626; color: #ffffff; }
.theme-connect .rk-brand-btn:hover { background: #b91c1c; color: #ffffff; }

/* Darshan by DivinIQ: Royal Plum (#3B0764), Sunset Gold (#F59E0B), Warm Cream */
.theme-darshan .rk-brand-hero {
    background: radial-gradient(700px 420px at 85% 20%, rgba(245, 158, 11, 0.18), transparent 60%),
                linear-gradient(135deg, #2e054e 0%, #4c1d95 100%);
    color: #fef3c7;
}
.theme-darshan .rk-brand-hero h1,
.theme-darshan .rk-brand-hero h2 { color: #ffffff; }
.theme-darshan .rk-brand-accent { color: #fbbf24; }
.theme-darshan .rk-brand-btn { background: #f59e0b; color: #2e054e; font-weight: 700; }

/* --------------------------------------------------------------------------
   4. Brand FAQ Accordion & Cross-Brand Discovery
   -------------------------------------------------------------------------- */
.rk-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 860px;
}

.rk-faq-item {
    background: #ffffff;
    border: 1px solid var(--rk-border);
    border-radius: 16px;
    padding: 20px 24px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.rk-faq-item[open] {
    border-color: var(--rk-blue);
    box-shadow: var(--rk-shadow-sm);
}

.rk-faq-item summary {
    font-family: var(--rk-font-display);
    font-size: 16.5px;
    font-weight: 700;
    color: var(--rk-navy);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.rk-faq-item summary::-webkit-details-marker {
    display: none;
}

.rk-faq-item summary::after {
    content: "+";
    font-size: 22px;
    font-weight: 400;
    color: var(--rk-blue);
    transition: transform 0.3s var(--rk-ease);
}

.rk-faq-item[open] summary::after {
    transform: rotate(45deg);
}

.rk-faq-item p {
    margin-top: 12px;
    font-size: 14.5px;
    color: var(--rk-slate);
    line-height: 1.7;
    animation: rk-faq-in 0.35s var(--rk-ease);
}

@keyframes rk-faq-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.rk-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

/* --------------------------------------------------------------------------
   5. Responsive Rules (Mobile Vertical Ecosystem Stack)
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
    .rk-eco-diagram {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 16px;
    }

    .rk-eco-lines {
        display: none;
    }

    .rk-eco-hub {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        height: auto;
        border-radius: 20px;
        flex-direction: row;
        gap: 14px;
        padding: 18px 24px;
        margin-bottom: 8px;
    }

    .rk-eco-hub img {
        margin-bottom: 0;
    }

    .rk-eco-node[data-pos] {
        grid-column: 1 !important;
        grid-row: auto !important;
    }

    .rk-eco-big-card {
        grid-column: span 12;
    }

    .rk-related-grid {
        grid-template-columns: 1fr;
    }

    .rk-eco-hero-collage {
        grid-template-columns: repeat(2, 1fr);
    }
}
