html, body {
    font-family: 'Noto Sans Devanagari', 'Inter', sans-serif;
    background: #fcfaf6;
    color: #1f2937;
    text-rendering: optimizeLegibility;
}

.bg-cream-pattern {
    background-color: #fdfbf7;
    background-image: radial-gradient(rgba(122, 28, 48, .08) .4px, transparent .4px), radial-gradient(rgba(122, 28, 48, .08) .4px, #fdfbf7 .4px);
    background-size: 16px 16px;
    background-position: 0 0, 8px 8px;
}

.maroon-card {
    background: linear-gradient(135deg, #7a1c30 0%, #5a1323 100%);
}

.badge-verified {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.nav-link {
    border-bottom: 2.5px solid transparent;
    transition: .2s;
}

.nav-link.active {
    color: #7a1c30;
    border-bottom-color: #ea580c;
}

/* Ticker Animation */
.nx-ticker {
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    flex: 1;
}

.nx-ticker>div {
    display: inline-flex;
    gap: 2rem;
    min-width: max-content;
    animation: nxTicker 28s linear infinite;
}

.nx-ticker:hover>div {
    animation-play-state: paused;
}

.nx-ticker a {
    color: #fde68a;
    font-weight: 600;
}

@keyframes nxTicker {
    from { transform: translateX(90vw); }
    to { transform: translateX(-100%); }
}

/* Mobile Links & Flash Message */
.nx-mobile-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #6b7280;
    font-size: 10px;
    font-weight: 700;
}

.nx-mobile-link i { font-size: 16px; }
.nx-mobile-link.active { color: #7a1c30; }
.nx-mobile-link.whatsapp { color: #059669; }

.nx-public-flash {
    position: fixed;
    top: 94px;
    right: 18px;
    z-index: 80;
    max-width: min(420px, calc(100vw - 36px));
    padding: 12px 16px;
    border-radius: 14px;
    background: #fff;
    color: #5c1322;
    border: 1px solid #f7ced6;
    box-shadow: 0 16px 40px rgba(56, 8, 18, .16);
    font-size: 13px;
    font-weight: 700;
}

/* Devnagari (Marathi) Font Fixes */

/* 1. News Cards Title & Excerpt Line Clamp Fix */
.nx-line-clamp-2 {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    line-height: 1.65 !important;
    padding-top: 2px !important;
    padding-bottom: 4px !important;
}

/* 2. Category badge clipping fix */
article span.uppercase,
.content-tags span,
.inline-flex.bg-orange-600 {
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1.5 !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}

/* Pagination */
.nx-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex-wrap: wrap;
    margin: 28px 0 5px;
}

.nx-pagination a, .nx-pagination span {
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid #f7ced6;
    border-radius: 12px;
    background: #fff;
    color: #7a1c30;
    font-size: 12px;
    font-weight: 800;
}

.nx-pagination a:hover, .nx-pagination .active {
    background: #7a1c30;
    border-color: #7a1c30;
    color: #fff;
}

.nx-pagination .disabled, .nx-pagination .dots {
    opacity: .45;
}

/* Article Content */
.nx-article-content {
    font-size: 1rem;
    line-height: 1.95;
    color: #374151;
    text-align: justify;
    overflow-wrap: anywhere;
}

.nx-article-content p, .nx-article-content ul, .nx-article-content ol, .nx-article-content blockquote {
    margin: 0 0 1.15em;
}

.nx-article-content h2, .nx-article-content h3, .nx-article-content h4 {
    margin: 1.35em 0 .55em;
    color: #7a1c30;
    font-weight: 800;
    line-height: 1.6;
}

.nx-article-content ul { list-style: disc; padding-left: 1.5rem; }
.nx-article-content ol { list-style: decimal; padding-left: 1.5rem; }
.nx-article-content a { color: #7a1c30; text-decoration: underline; }
.nx-article-content blockquote {
    border-left: 4px solid #d97706;
    background: #f7f2e9;
    padding: 1rem;
    border-radius: 0 12px 12px 0;
}

.nx-article-image {
    width: 100%;
    height: min(470px, 52vw);
    min-height: 220px;
    object-fit: cover;
    border-radius: 24px;
}

.content-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.content-tags span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #fdf2f4;
    color: #7a1c30;
    font-size: 12px;
    font-weight: 800;
}

/* Profile Editor & Forms */
.profile-editor { display: grid; gap: 14px; }
.profile-editor label { display: grid; gap: 6px; font-size: 12px; font-weight: 800; color: #4b5563; }
.profile-editor input, .profile-editor textarea, .profile-editor select {
    width: 100%;
    border: 1px solid #d1d5db;
    background: #fcfaf6;
    border-radius: 13px;
    padding: 11px 13px;
    font: inherit;
    color: #1f2937;
    outline: none;
}

.profile-editor input:focus, .profile-editor textarea:focus, .profile-editor select:focus {
    border-color: #7a1c30;
    box-shadow: 0 0 0 3px rgba(122, 28, 48, .08);
}

.profile-editor button {
    border: 0;
    border-radius: 13px;
    background: #059669;
    color: #fff;
    padding: 12px 16px;
    font-weight: 800;
    cursor: pointer;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* Media Queries */
@media(max-width: 640px) {
    .form-grid { grid-template-columns: 1fr; }
    .nx-article-image { height: 240px; }
    .nx-public-flash { top: 88px; }
    .nx-ticker>div { animation-duration: 20s; }
}

@media(prefers-reduced-motion: reduce) {
    .nx-ticker>div { animation: none; }
}



/* =========================================================
   Devanagari (Marathi) Font & Line-Clamp Fixes
   ========================================================= */

/* 1. Heading line-height and font-weight fix */
h1, h2, h3, h4 {
    font-weight: 700 !important;
    text-rendering: optimizeLegibility;
}

/* 2. Two-line title and description clamp fix */
.nx-line-clamp-2 {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    line-height: 1.65 !important;
    padding-top: 3px !important;
    padding-bottom: 5px !important;
}

/* 3. Prevent category tags from being clipped */
article span.uppercase, 
.content-tags span,
.inline-flex.bg-orange-600 {
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1.5 !important;
    padding-top: 3px !important;
    padding-bottom: 3px !important;
}



/* =========================================================
   Universal Category Tag / Badge Fix (All Pages)
   ========================================================= */
article span.uppercase,
article span[class*="text-orange"],
article span[class*="bg-brandMaroon"],
article span[class*="bg-red"],
.content-tags span,
.nx-category-tag {
    font-family: 'Baloo 2', 'Noto Sans Devanagari', sans-serif !important;
    font-weight: 700 !important;
    text-transform: none !important; /* preserve the entered letter case */
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1.6 !important; /* provide sufficient vertical spacing */
    padding-top: 3px !important;
    padding-bottom: 3px !important;
    overflow: visible !important;
}

