/* Niyama Vartha Legal Portal - Main Stylesheet */

/* Top Utility Bar */
.nv-topbar {
    background-color: var(--nv-navy);
    color: #E2E8F0;
    font-size: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 0;
}

.nv-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.nv-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.nv-edition-pill {
    background: rgba(255, 255, 255, 0.14);
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 700;
    color: #FFFFFF;
    font-size: 11px;
}

.nv-date-badge {
    font-weight: 500;
    color: #CBD5E1;
}

.nv-topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.nv-topbar-link {
    color: #E2E8F0;
    font-weight: 500;
}

.nv-topbar-link:hover {
    color: #FBBF24;
}

.nv-portal-cta {
    background-color: var(--nv-crimson);
    color: #FFFFFF !important;
    padding: 3px 10px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 11px;
}

.nv-portal-cta:hover {
    background-color: var(--nv-crimson-dark);
}

/* Main Masthead */
.nv-masthead {
    background-color: var(--nv-surface);
    padding: 18px 0;
    border-bottom: 2px solid var(--nv-navy);
}

.nv-masthead-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
}

.nv-masthead-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nv-parent-pub {
    font-size: 11.5px;
    color: var(--nv-text-light);
    font-weight: 600;
}

.nv-parent-pub a {
    color: var(--nv-crimson);
    font-weight: 700;
}

.nv-live-bench {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #065F46;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    padding: 3px 9px;
    border-radius: 4px;
    width: fit-content;
}

.nv-pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10B981;
    border-radius: 50%;
    animation: nvPulse 1.5s infinite;
}

@keyframes nvPulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.nv-brand {
    text-align: center;
}

.nv-brand-title {
    font-family: var(--font-ml-serif);
    font-size: 38px;
    font-weight: 900;
    color: var(--nv-navy);
    line-height: 1.15;
}

.nv-brand-title span {
    color: var(--nv-crimson);
}

.nv-brand-sub {
    font-size: 12px;
    font-weight: 700;
    color: var(--nv-text-muted);
    margin-top: 3px;
}

.nv-masthead-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nv-search-form {
    display: flex;
    border: 1px solid var(--nv-border-dark);
    border-radius: 4px;
    overflow: hidden;
    background: #F8FAFC;
}

.nv-search-form input {
    border: none;
    background: transparent;
    padding: 7px 12px;
    font-size: 13px;
    width: 225px;
    outline: none;
    color: var(--nv-text-main);
}

.nv-search-form button {
    background: var(--nv-navy);
    color: #FFFFFF;
    border: none;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.nv-search-form button:hover {
    background: var(--nv-crimson);
}

/* Primary Navigation Bar */
.nv-navbar {
    background-color: var(--nv-navy);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.nv-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nv-nav-menu {
    display: flex;
    list-style: none;
    overflow-x: auto;
    white-space: nowrap;
}

.nv-nav-menu li a {
    display: block;
    color: #FFFFFF;
    font-size: 13.5px;
    font-weight: 700;
    padding: 11px 15px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.nv-nav-menu li a:hover,
.nv-nav-menu li.current-menu-item a {
    background-color: var(--nv-crimson);
    color: #FFFFFF;
}

.nv-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 18px;
    padding: 10px 14px;
    cursor: pointer;
}

/* Breaking Legal Ticker */
.nv-ticker-bar {
    background-color: #FFFFFF;
    border-bottom: 1px solid var(--nv-border);
    padding: 8px 0;
}

.nv-ticker-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.nv-ticker-label {
    background-color: var(--nv-crimson);
    color: #FFFFFF;
    font-size: 11.5px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 2px;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.nv-ticker-viewport {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    position: relative;
}

.nv-ticker-track {
    display: flex;
    width: max-content;
    white-space: nowrap;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--nv-navy);
    animation: nvTickerScroll 36s linear infinite;
    will-change: transform;
}

.nv-ticker-viewport:hover .nv-ticker-track,
.nv-ticker-viewport:focus-within .nv-ticker-track {
    animation-play-state: paused;
}

.nv-ticker-group {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    padding-right: 24px;
    flex-shrink: 0;
}

.nv-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--nv-navy);
}

.nv-ticker-item:hover {
    color: var(--nv-crimson);
}

.nv-ticker-sep {
    color: var(--nv-crimson);
    font-weight: 800;
}

.nv-ticker-citation {
    font-family: var(--font-mono);
    font-size: 11px;
    background: #FEF2F2;
    color: var(--nv-crimson);
    padding: 1px 6px;
    border-radius: 3px;
    border: 1px solid #FECACA;
}

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

/* Main Portal Grid */
.nv-portal-main {
    padding: 20px 0 40px;
    position: relative;
    z-index: 1;
}

.nv-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.15fr) minmax(0, 1.15fr);
    align-items: start;
    gap: 20px;
    margin-bottom: 24px;
}

.nv-card {
    background: var(--nv-surface);
    border: 1px solid var(--nv-border);
    border-radius: 4px;
    padding: 16px;
    position: relative;
    height: auto;
    min-height: 0;
    overflow: hidden;
}

/* Lead Story Column */
.nv-lead-story {
    display: block;
    height: auto !important;
    overflow: visible;
}

.nv-lead-article {
    display: block;
    position: relative;
    margin-bottom: 14px;
}

.nv-lead-thumb {
    display: block;
    position: relative;
    width: 100%;
    height: 310px;
    margin-bottom: 14px;
    border-radius: 3px;
    overflow: hidden;
    background: #0F172A;
}

.nv-lead-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.nv-lead-story:hover .nv-lead-thumb img {
    transform: scale(1.02);
}

.nv-badge-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.nv-cat-badge {
    display: inline-block;
    background: var(--nv-crimson);
    color: #FFFFFF !important;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 2px;
    line-height: 1.3;
}

.nv-cat-badge.navy {
    background: var(--nv-navy);
}

.nv-citation-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: #1E3A8A;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    padding: 2px 7px;
    border-radius: 3px;
    line-height: 1.3;
}

.nv-lead-title {
    font-family: var(--font-ml-serif);
    font-size: 25px;
    font-weight: 900;
    line-height: 1.38;
    color: var(--nv-navy);
    margin: 0 0 10px 0 !important;
    position: static !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.nv-lead-title a:hover {
    color: var(--nv-crimson);
}

.nv-lead-excerpt {
    font-size: 14.5px;
    color: var(--nv-text-muted);
    margin: 0 0 14px 0 !important;
    line-height: 1.65;
    position: static !important;
}

.nv-meta-line {
    font-size: 12px;
    color: var(--nv-text-light);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--nv-border);
    padding-top: 10px;
    margin-top: 10px;
}

/* Sub-lead bullet list */
.nv-sublead-list {
    margin: 14px 0 0 0 !important;
    padding: 12px 0 0 0 !important;
    border-top: 2px solid var(--nv-navy);
    list-style: none !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: static !important;
    clear: both;
}

.nv-sublead-list li {
    position: relative;
    padding-left: 14px !important;
    margin: 0 !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--nv-navy);
}

.nv-sublead-list li::before {
    content: "▪";
    color: var(--nv-crimson);
    position: absolute;
    left: 0;
    top: 0;
}

/* Section Headers & Lists */
.nv-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--nv-navy);
    padding-bottom: 6px;
    margin-bottom: 14px;
}

.nv-section-title {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--nv-navy);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nv-section-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 16px;
    background-color: var(--nv-crimson);
}

.nv-section-more {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--nv-crimson);
}

.nv-story-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.nv-story-item {
    display: flex;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--nv-border);
}

.nv-story-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.nv-story-item-thumb {
    width: 96px;
    height: 68px;
    flex-shrink: 0;
    border-radius: 3px;
    overflow: hidden;
    background: #E2E8F0;
}

.nv-story-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nv-story-item-title {
    font-family: var(--font-ml-serif);
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--nv-text-main);
    margin-bottom: 4px;
}

.nv-story-item-meta {
    font-size: 11.5px;
    color: var(--nv-text-light);
}

/* Right Column Digest Box */
.nv-digest-box {
    background: #F8FAFC;
    border: 1px solid #CBD5E1;
    border-top: 3px solid var(--nv-navy);
    border-radius: 4px;
    padding: 14px;
    margin-bottom: 16px;
}

.nv-digest-item {
    padding: 10px 0;
    border-bottom: 1px dashed #CBD5E1;
}

.nv-digest-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.nv-digest-court {
    font-size: 11px;
    font-weight: 800;
    color: var(--nv-crimson);
}

.nv-digest-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--nv-navy);
    line-height: 1.4;
    margin: 3px 0;
}

.nv-digest-cite {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--nv-text-muted);
}

/* 4-Column Category Sections */
.nv-category-block {
    display: block;
    background: var(--nv-surface);
    border: 1px solid var(--nv-border);
    border-radius: 4px;
    padding: 18px;
    margin-top: 8px;
    margin-bottom: 24px;
    position: relative;
    clear: both;
    height: auto !important;
    overflow: visible;
    z-index: 1;
}

.nv-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: 18px;
    height: auto !important;
}

.nv-grid-4 > article {
    display: block;
    min-width: 0;
    height: auto !important;
    position: relative;
}

.nv-grid-card-thumb {
    display: block;
    width: 100%;
    height: 175px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
    background: #E2E8F0;
}

.nv-grid-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nv-grid-card-title {
    font-family: var(--font-ml-serif);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--nv-navy);
    margin: 0 0 6px 0 !important;
    position: static !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Two-Column Split */
.nv-two-col-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 20px;
    margin-top: 8px;
    margin-bottom: 24px;
    position: relative;
    clear: both;
    height: auto !important;
}

/* Single Post View */
.nv-single-layout {
    display: grid;
    grid-template-columns: 2.3fr 1fr;
    gap: 24px;
    padding: 24px 0 48px;
}

.nv-article-card {
    background: var(--nv-surface);
    border: 1px solid var(--nv-border);
    border-radius: 4px;
    padding: 28px;
}

.nv-article-header {
    border-bottom: 1px solid var(--nv-border);
    padding-bottom: 18px;
    margin-bottom: 20px;
}

.nv-article-title {
    font-family: var(--font-ml-serif);
    font-size: 30px;
    font-weight: 900;
    line-height: 1.32;
    color: var(--nv-navy);
    margin: 10px 0 12px;
}

.nv-case-meta-box {
    background: #F8FAFC;
    border-left: 4px solid var(--nv-crimson);
    border-top: 1px solid var(--nv-border);
    border-right: 1px solid var(--nv-border);
    border-bottom: 1px solid var(--nv-border);
    padding: 14px 18px;
    margin: 18px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    font-size: 13px;
}

.nv-case-meta-item strong {
    display: block;
    font-size: 11px;
    color: var(--nv-text-light);
}

.nv-case-meta-item span {
    font-weight: 700;
    color: var(--nv-navy);
}

.nv-reading-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #F1F5F9;
    padding: 8px 14px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 12px;
}

.nv-font-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nv-font-btn {
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    padding: 3px 9px;
    border-radius: 3px;
    font-weight: 700;
    cursor: pointer;
    color: var(--nv-navy);
}

.nv-font-btn:hover {
    background: var(--nv-navy);
    color: #FFFFFF;
}

.nv-article-content {
    font-size: 17.5px;
    line-height: 1.85;
    color: #1F2937;
}

.nv-article-content p {
    margin-bottom: 18px;
}

.nv-article-content h2,
.nv-article-content h3 {
    font-family: var(--font-ml-serif);
    color: var(--nv-navy);
    margin: 26px 0 12px;
}

.nv-article-content blockquote {
    background: #F8FAFC;
    border-left: 4px solid var(--nv-navy);
    padding: 14px 20px;
    margin: 20px 0;
    font-family: var(--font-ml-serif);
    font-style: italic;
    color: #334155;
}

/* Footer */
.nv-footer {
    background-color: var(--nv-navy);
    color: #CBD5E1;
    padding: 40px 0 20px;
    border-top: 4px solid var(--nv-crimson);
    font-size: 13.5px;
}

.nv-footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.nv-footer-title {
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 14px;
}

.nv-footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nv-footer-links a:hover {
    color: #FBBF24;
}

.nv-footer-bottom {
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: #94A3B8;
}

@media (max-width: 1024px) {
    .nv-hero-grid {
        grid-template-columns: 1fr 1fr;
    }
    .nv-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .nv-single-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nv-masthead-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .nv-masthead-left,
    .nv-masthead-right {
        justify-content: center;
        align-items: center;
    }
    .nv-brand-title {
        font-size: 30px;
    }
    .nv-lead-thumb {
        height: 210px;
    }
    .nv-mobile-toggle {
        display: block;
    }
    .nv-nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
    }
    .nv-nav-menu.is-open {
        display: flex;
    }
    .nv-hero-grid,
    .nv-two-col-split,
    .nv-footer-grid {
        grid-template-columns: 1fr;
    }
}
