/* ============================================================
   HOME PAGE STYLES — Share Market Pro (Trading Terminal)
   ============================================================ */

/* ── Hero Section ──────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(160deg, #f4f6f9 0%, #ffffff 55%, #f0f4f0 100%);
}

/* Radial glow */
.hero__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 62% 38%, rgba(0, 168, 68, 0.06) 0%, transparent 65%),
        radial-gradient(ellipse 45% 40% at 12% 78%, rgba(0, 168, 68, 0.03) 0%, transparent 55%),
        radial-gradient(ellipse 30% 30% at 80% 80%, rgba(0, 168, 68, 0.025) 0%, transparent 55%);
    pointer-events: none;
}

/* Grid lines */
.hero__grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,0,0,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* ── Candlestick chart scene ───────────────────────────── */
.hero__chart-scene {
    position: absolute;
    right: -3%;
    top: 50%;
    transform: translateY(-50%);
    width: 58%;
    max-width: 700px;
    pointer-events: none;
    /* fade left edge so it blends into content */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 18%, black 88%, transparent 100%);
    mask-image:         linear-gradient(to right, transparent 0%, black 18%, black 88%, transparent 100%);
}

.hero__chart-svg {
    width: 100%;
    height: auto;
    display: block;
}

/* ── SVG element classes ───────────────────────────────── */

/* Horizontal grid lines inside SVG */
.hero__grid-h {
    stroke: rgba(0,0,0,0.055);
    stroke-width: 1;
}

/* Area fill */
.hero__area-fill {
    fill: url(#areaGrad);
}

/* Price line */
.hero__price-line {
    stroke: #00c853;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Candle wicks */
.hero__wick {
    stroke-width: 1.5;
    stroke-linecap: round;
}
.hero__wick--bull { stroke: #00c853; }
.hero__wick--bear { stroke: #f44336; }

/* Candle bodies — animated entrance */
.hero__candle {
    animation: candleDrop 0.5s cubic-bezier(0.22,1,0.36,1) both;
    animation-delay: var(--cd, 0s);
    transform-origin: center top;
}
.hero__candle--bull { fill: url(#bullGrad); }
.hero__candle--bear { fill: url(#bearGrad); }

@keyframes candleDrop {
    from { transform: scaleY(0); opacity: 0; }
    to   { transform: scaleY(1); opacity: 1; }
}

/* Volume bars */
.hero__vol {
    opacity: 0.35;
}
.hero__vol--bull { fill: #00c853; }
.hero__vol--bear { fill: #f44336; }

/* Current price indicator */
.hero__price-indicator {
    stroke: #00c853;
    stroke-width: 1;
    opacity: 0.5;
    animation: priceBlink 2.4s ease-in-out infinite;
}
@keyframes priceBlink {
    0%, 100% { opacity: 0.5; }
    50%       { opacity: 0.15; }
}

/* Price tag */
.hero__price-tag-bg  { fill: #00c853; }
.hero__price-tag-text {
    fill: #ffffff;
    font-size: 9px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-anchor: middle;
    dominant-baseline: middle;
    letter-spacing: 0.03em;
}

/* ── Dark theme overrides ──────────────────────────────── */
[data-theme="dark"] .hero {
    background: linear-gradient(160deg, #060608 0%, #0a0a0a 55%, #060c06 100%);
}

[data-theme="dark"] .hero__bg {
    background:
        radial-gradient(ellipse 70% 55% at 62% 38%, rgba(0, 200, 83, 0.07) 0%, transparent 65%),
        radial-gradient(ellipse 45% 40% at 12% 78%, rgba(0, 200, 83, 0.04) 0%, transparent 55%),
        radial-gradient(ellipse 30% 30% at 80% 80%, rgba(0, 200, 83, 0.03) 0%, transparent 55%);
}

[data-theme="dark"] .hero__grid-lines {
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
}

[data-theme="dark"] .hero__grid-h {
    stroke: rgba(255,255,255,0.06);
}

[data-theme="dark"] .hero__price-line {
    stroke: #00c853;
}

[data-theme="dark"] .hero__price-indicator {
    stroke: #00c853;
    opacity: 0.45;
}

[data-theme="dark"] .hero__vol {
    opacity: 0.28;
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 680px;
}

/* SEBI badge */
.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(0, 200, 83, 0.08);
    border: 1px solid rgba(0, 200, 83, 0.22);
    border-radius: 100px;
    font-size: 0.8125rem;
    color: #00a844;
    font-weight: 600;
    margin-bottom: 1.75rem;
    letter-spacing: 0.02em;
}

.hero__badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00c853;
    animation: hero-pulse 2s infinite;
    flex-shrink: 0;
}

@keyframes hero-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.75); }
}

.hero__title {
    font-size: clamp(2.5rem, 5.5vw, 4rem);
    font-weight: 800;
    line-height: 1.08;
    color: #0d0d0d;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero__title-accent {
    color: #00a844;
    position: relative;
}

.hero__subtitle {
    font-size: 1.125rem;
    color: #4a4a4a;
    line-height: 1.75;
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.hero__actions {
    display: flex;
    gap: 0.875rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 3rem;
}

/* Trust indicators */
.hero__trust {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding-top: 2.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid #e2e5ea;
}

.hero__trust-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: #666666;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color 0.2s ease;
}

.hero__trust-item:hover {
    color: #0d0d0d;
}

.hero__trust-icon {
    color: #00c853;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* ── Stats Section ─────────────────────────────────────── */
.stats-section {
    padding: 0;
    border-top: 1px solid #e2e5ea;
    border-bottom: 1px solid #e2e5ea;
    background: #ffffff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
}

.stat-item {
    padding: 2.5rem 1.5rem;
    border-right: 1px solid #e2e5ea;
    transition: background 0.2s;
}

.stat-item:last-child { border-right: none; }

.stat-item:hover { background: #f8f9fa; }

.stat-item__number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0d0d0d;
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.stat-item__number span { color: #00a844; }

.stat-item__label {
    font-size: 0.8125rem;
    color: #888888;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Section Base ──────────────────────────────────────── */
.section {
    padding: 5.5rem 0;
}

.section--alt {
    background: #f8f9fa;
    border-top: 1px solid #e2e5ea;
    border-bottom: 1px solid #e2e5ea;
}

.section__header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section__label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #00a844;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.875rem;
}

.section__title {
    font-size: clamp(1.875rem, 3.5vw, 2.75rem);
    font-weight: 800;
    color: #0d0d0d;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.section__subtitle {
    font-size: 1.0625rem;
    color: #4a4a4a;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.75;
}

.section__footer {
    text-align: center;
    margin-top: 2.5rem;
}

/* ── Plans Grid ────────────────────────────────────────── */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1rem;
}

/* ── Analyst Cards Grid ────────────────────────────────── */
.analysts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.analyst-card {
    background: #ffffff;
    border: 1px solid #e2e5ea;
    border-radius: 12px;
    padding: 1.75rem 1.25rem;
    text-align: center;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
}

.analyst-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0,168,68,0), transparent);
    transition: background 0.3s;
}

.analyst-card:hover {
    border-color: rgba(0, 168, 68, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0,168,68,0.1);
}

.analyst-card:hover::before {
    background: linear-gradient(90deg, transparent, rgba(0,168,68,0.6), transparent);
}

.analyst-card__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 1.125rem;
    object-fit: cover;
    border: 2px solid #e2e5ea;
    display: block;
}

.analyst-card__name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0d0d0d;
    margin-bottom: 0.25rem;
}

.analyst-card__spec {
    font-size: 0.8125rem;
    color: #888888;
    margin-bottom: 1rem;
}

.analyst-card__meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 0.8125rem;
}

.analyst-card__rating {
    color: #f59e0b;
    font-weight: 700;
}

.analyst-card__subs {
    color: #888888;
}

.analyst-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: #00a844;
    background: rgba(0, 168, 68, 0.08);
    border: 1px solid rgba(0, 168, 68, 0.15);
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
    margin-top: 0.875rem;
}

/* ── Content Grid (Articles/Videos) ───────────────────── */
.content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.content-card {
    background: #ffffff;
    border: 1px solid #e2e5ea;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: block;
}

.content-card:hover {
    border-color: rgba(0, 168, 68, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.content-card__image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: #f8f9fa;
    display: block;
}

.content-card__image-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d0d4db;
}

.content-card__body {
    padding: 1.25rem;
}

.content-card__category {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #00a844;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.content-card__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0d0d0d;
    line-height: 1.45;
    margin-bottom: 0.625rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-card__meta {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.8125rem;
    color: #888888;
    margin-top: 0.875rem;
}

.content-card__author-img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* ── How It Works ──────────────────────────────────────── */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
}

/* Connector line */
.steps-grid::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 12.5%;
    right: 12.5%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e5ea 20%, #e2e5ea 80%, transparent);
    pointer-events: none;
}

.step-card {
    text-align: center;
    position: relative;
}

.step-card__number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e2e5ea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 800;
    color: #00a844;
    margin: 0 auto 1.5rem;
    position: relative;
    z-index: 1;
    font-family: var(--font-mono);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.step-card:hover .step-card__number {
    background: rgba(0, 168, 68, 0.08);
    border-color: rgba(0, 168, 68, 0.3);
    box-shadow: 0 0 20px rgba(0, 168, 68, 0.12);
}

.step-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: #0d0d0d;
    margin-bottom: 0.625rem;
}

.step-card__desc {
    font-size: 0.875rem;
    color: #888888;
    line-height: 1.7;
}

/* ── CTA Section ───────────────────────────────────────── */
.cta-section {
    padding: 6rem 0;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-top: 1px solid #e2e5ea;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(0, 168, 68, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.cta-section__inner {
    position: relative;
    z-index: 1;
}

.cta-section__label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #00a844;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.cta-section__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #0d0d0d;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.cta-section__subtitle {
    font-size: 1.0625rem;
    color: #4a4a4a;
    margin-bottom: 2.5rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

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

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1024px) {
    .plans-grid        { grid-template-columns: repeat(2, 1fr); }
    .analysts-grid     { grid-template-columns: repeat(3, 1fr); }
    .steps-grid        { grid-template-columns: repeat(2, 1fr); }
    .steps-grid::before{ display: none; }
    .stats-grid        { grid-template-columns: repeat(2, 1fr); }
    .stat-item         { border-right: none; border-bottom: 1px solid #e2e5ea; }
    .stat-item:last-child { border-bottom: none; }
}

@media (max-width: 768px) {
    .hero              { min-height: 80vh; }
    .plans-grid        { grid-template-columns: 1fr; }
    .analysts-grid     { grid-template-columns: repeat(2, 1fr); }
    .content-grid      { grid-template-columns: 1fr; }
    .steps-grid        { grid-template-columns: 1fr; }
    .stats-grid        { grid-template-columns: repeat(2, 1fr); }
    .hero__actions     { flex-direction: column; align-items: flex-start; }
    .hero__trust       { gap: 1.5rem; padding-top: 2rem; }
    .section           { padding: 4rem 0; }
}

@media (max-width: 480px) {
    .analysts-grid     { grid-template-columns: 1fr; }
    .stats-grid        { grid-template-columns: 1fr; }
    .stat-item         { border-right: none; border-bottom: 1px solid #e2e5ea; }
    .hero__trust       { gap: 1.25rem; }
    .hero__trust-item  { font-size: 0.8125rem; }
}

/* ============================================================
   DARK THEME OVERRIDES
   ============================================================ */
[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #0a0a0a 0%, #050505 100%);
}

[data-theme="dark"] .hero__bg {
    background:
        radial-gradient(ellipse 80% 60% at 55% 40%, rgba(0, 200, 83, 0.07) 0%, transparent 65%),
        radial-gradient(ellipse 50% 40% at 15% 75%, rgba(0, 200, 83, 0.03) 0%, transparent 55%);
}

[data-theme="dark"] .hero__grid-lines {
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
}

[data-theme="dark"] .hero__badge {
    background: rgba(0, 200, 83, 0.08);
    border-color: rgba(0, 200, 83, 0.25);
    color: #00c853;
}

[data-theme="dark"] .hero__badge-dot {
    background: #00c853;
}

[data-theme="dark"] .hero__title {
    color: #f5f5f5;
}

[data-theme="dark"] .hero__subtitle {
    color: #9e9e9e;
}

[data-theme="dark"] .hero__trust {
    border-top-color: #1a1a1a;
}

[data-theme="dark"] .hero__trust-item {
    color: #9e9e9e;
}

[data-theme="dark"] .hero__trust-item:hover {
    color: #f5f5f5;
}

[data-theme="dark"] .hero__trust-icon {
    color: #00c853;
}

[data-theme="dark"] .section {
    background: #050505;
}

[data-theme="dark"] .section--alt {
    background: #0a0a0a;
}

[data-theme="dark"] .section__title,
[data-theme="dark"] .section__heading {
    color: #f5f5f5;
}

[data-theme="dark"] .section__subtitle,
[data-theme="dark"] .section__desc {
    color: #9e9e9e;
}

[data-theme="dark"] .feature-card {
    background: #0d0d0d;
    border-color: #1a1a1a;
}

[data-theme="dark"] .feature-card:hover {
    border-color: rgba(0, 200, 83, 0.3);
    background: #111;
}

[data-theme="dark"] .feature-card__title {
    color: #f5f5f5;
}

[data-theme="dark"] .feature-card__desc {
    color: #888;
}

[data-theme="dark"] .stats-section {
    background: #050505;
    border-top-color: #1a1a1a;
    border-bottom-color: #1a1a1a;
}

[data-theme="dark"] .stat-item {
    border-color: #1a1a1a;
}

[data-theme="dark"] .stat-item:hover {
    background: #0a0a0a;
}

[data-theme="dark"] .stat-item__number {
    color: #f5f5f5;
}

[data-theme="dark"] .stat-item__label {
    color: #888;
}

[data-theme="dark"] .step-card {
    background: #0d0d0d;
    border-color: #1a1a1a;
}

[data-theme="dark"] .step-card:hover {
    border-color: rgba(0, 200, 83, 0.3);
    background: #111;
}

[data-theme="dark"] .step-card__title {
    color: #f5f5f5;
}

[data-theme="dark"] .step-card__desc {
    color: #888;
}

[data-theme="dark"] .steps-grid::before {
    background: linear-gradient(to bottom, transparent 0%, #1a1a1a 50%, transparent 100%);
}

[data-theme="dark"] .analyst-card {
    background: #0d0d0d;
    border-color: #1a1a1a;
}

[data-theme="dark"] .analyst-card:hover {
    border-color: rgba(0, 200, 83, 0.3);
    background: #111;
}

[data-theme="dark"] .analyst-card__name {
    color: #f5f5f5;
}

[data-theme="dark"] .analyst-card__title {
    color: #888;
}

[data-theme="dark"] .analyst-card__sebi {
    background: rgba(0, 200, 83, 0.06);
    border-color: rgba(0, 200, 83, 0.2);
}

[data-theme="dark"] .content-card {
    background: #0d0d0d;
    border-color: #1a1a1a;
}

[data-theme="dark"] .content-card:hover {
    border-color: rgba(0, 200, 83, 0.3);
    background: #111;
}

[data-theme="dark"] .content-card__title {
    color: #f5f5f5;
}

[data-theme="dark"] .content-card__desc {
    color: #888;
}

[data-theme="dark"] .cta-section {
    background: linear-gradient(135deg, #0a0a0a 0%, #050505 100%);
}

[data-theme="dark"] .cta-section::before {
    background:
        radial-gradient(ellipse 70% 50% at 50% 50%, rgba(0, 200, 83, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 80% 20%, rgba(0, 200, 83, 0.04) 0%, transparent 50%);
}

[data-theme="dark"] .cta-section::after {
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
}

[data-theme="dark"] .cta-section__title {
    color: #f5f5f5;
}

[data-theme="dark"] .cta-section__subtitle {
    color: #9e9e9e;
}

/* ═══ DARK THEME - RESPONSIVE ═══════════════════════════════ */
@media (max-width: 1024px) {
    [data-theme="dark"] .stat-item {
        border-bottom-color: #1a1a1a;
    }
}

@media (max-width: 480px) {
    [data-theme="dark"] .stat-item {
        border-bottom-color: #1a1a1a;
    }
}

