/* NiveshWorld — Custom Styles */

:root {
    --color-primary: #1B6B3A;
    --color-primary-dark: #145530;
    --color-primary-light: #E8F5E9;
    --color-accent: #E8522F;
    --color-accent-dark: #C43E1E;
    --color-accent-light: #FFF3E0;
    --color-bg: #FFFFFF;
    --color-surface: #F8FAFC;
    --color-border: #E2E8F0;
    --color-text: #1E293B;
    --color-text-secondary: #64748B;
    --color-success: #16A34A;
    --color-danger: #DC2626;
    --color-warning: #F59E0B;
    --color-info: #2563EB;
}

/* ===== Base ===== */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', 'Noto Sans Devanagari', sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    overflow-x: hidden;
}

/* ===== Ticker Marquee ===== */
.ticker-wrap {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.ticker-track {
    display: inline-flex;
    animation: ticker-scroll 60s linear infinite;
}

.ticker-track:hover {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.live-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #EF4444;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

/* ===== Navigation ===== */
.nav-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-overlay {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ===== Quick Nav ===== */
.quick-nav {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.quick-nav::-webkit-scrollbar {
    display: none;
}

/* ===== Cards ===== */
.card-hover {
    transition: all 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ===== Section Headings ===== */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    border-radius: 2px;
}

/* ===== Range Slider (Calculator) ===== */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #E2E8F0;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-accent);
    cursor: pointer;
    border: 3px solid #FFFFFF;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-accent);
    cursor: pointer;
    border: 3px solid #FFFFFF;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* ===== Allocation Bar (Age Strategy) ===== */
.alloc-bar {
    display: flex;
    border-radius: 6px;
    overflow: hidden;
    height: 10px;
}

.alloc-bar > div {
    transition: width 0.4s ease;
}

/* ===== Status Badges ===== */
.badge-upcoming { background: #DBEAFE; color: #1D4ED8; }
.badge-open { background: #D1FAE5; color: #047857; }
.badge-closed { background: #F1F5F9; color: #64748B; }
.badge-listed { background: #ECFDF5; color: #059669; }
.badge-hot { background: #FEE2E2; color: #DC2626; }
.badge-new { background: #DBEAFE; color: #2563EB; }

.badge-breaking { background: #FEE2E2; color: #DC2626; }
.badge-ipo { background: var(--color-accent-light); color: var(--color-accent-dark); }
.badge-mf { background: var(--color-primary-light); color: var(--color-primary); }
.badge-economy { background: #DBEAFE; color: #1D4ED8; }

.badge-beginner { background: #D1FAE5; color: #047857; }
.badge-intermediate { background: var(--color-accent-light); color: var(--color-accent-dark); }
.badge-advanced { background: #FEE2E2; color: #DC2626; }

/* ===== Risk Dots (NFO) ===== */
.risk-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.risk-dot.filled { background: var(--color-accent); }
.risk-dot.empty { background: #E2E8F0; }

/* ===== Open Now Pulse ===== */
.pulse-open {
    position: relative;
}

.pulse-open::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -12px;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #16A34A;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

/* ===== Calculator Tabs ===== */
.calc-tab {
    position: relative;
    transition: all 0.2s ease;
}

.calc-tab.active {
    color: var(--color-primary);
    font-weight: 600;
}

.calc-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary);
    border-radius: 1px;
}

/* ===== Newsletter Gradient ===== */
.newsletter-bg {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

/* ===== Footer ===== */
.footer-bg {
    background: #0F172A;
}

/* ===== Scrollbar (Global) ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
    background: #94A3B8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748B;
}

/* ===== Monospace for numbers ===== */
.font-mono-num {
    font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
    font-variant-numeric: tabular-nums;
}

/* ===== Quiz Option Hover ===== */
.quiz-option {
    transition: all 0.2s ease;
    cursor: pointer;
}

.quiz-option:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

/* ===== Accordion (Mobile Menu) ===== */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.open {
    max-height: 500px;
}

/* ===== Table Responsive ===== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ===== Loading Skeleton ===== */
.skeleton {
    background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Google Translate Widget — Hidden (triggered by custom selector) ===== */
#gt-widget-hidden,
.goog-te-banner-frame,
.goog-te-balloon-frame,
.skiptranslate {
    display: none !important;
}

body { top: 0 !important; }

.goog-te-gadget {
    font-size: 0 !important;
}

/* Language dropdown styling */
#langDropdown {
    max-height: 280px;
    overflow-y: auto;
}

#langDropdown button:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

/* Blog Article Content */
.blog-content h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1E293B;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary-light);
}
.blog-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #334155;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}
.blog-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}
.blog-content p {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: #475569;
    margin-bottom: 1rem;
}
.blog-content ul, .blog-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}
.blog-content ul { list-style-type: disc; }
.blog-content ol { list-style-type: decimal; }
.blog-content li {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 0.35rem;
}
.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
}
.blog-content th {
    background: #F8FAFC;
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #334155;
    border: 1px solid #E2E8F0;
    font-size: 0.8rem;
}
.blog-content td {
    padding: 0.5rem 0.75rem;
    border: 1px solid #E2E8F0;
    color: #475569;
}
.blog-content tr:nth-child(even) td {
    background: #FAFBFC;
}
.blog-content strong {
    color: #1E293B;
    font-weight: 600;
}
.blog-content blockquote {
    border-left: 3px solid var(--color-primary);
    padding: 0.75rem 1rem;
    margin: 1.25rem 0;
    background: var(--color-primary-light);
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: #334155;
}
.blog-content .blog-faq {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-top: 1.5rem;
}
.blog-content .blog-faq h3 {
    border: none;
    margin-top: 0;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
