/* ===================================================================
   _MediaLayout.cshtml — Stylesheet
   DIPR, Government of Manipur — Media / News Portal
   Theme: Red / Black / White
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:wght@500;600;700&family=Noto+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
    /* --- Palette: Red / Black / White --- */
    --color-red: #C8102E;
    --color-red-dark: #8C0C22;
    --color-black: #141414;
    --color-charcoal: #2A2A2A;
    --color-white: #FFFFFF;
    --color-offwhite: #F5F5F5;
    --color-ink: #171717;
    --color-muted: #61605F;
    --color-border: #E2E0DF;
    /* --- Type --- */
    --font-display: 'Noto Serif', Georgia, 'Times New Roman', serif;
    --font-body: 'Noto Sans', -apple-system, Segoe UI, Roboto, sans-serif;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
    /* --- Layout --- */
    --shell-max: 1320px;
    --strip-h: 34px;
    --header-h: 76px;
    --sidebar-w: 280px;
    --radius: 6px;
    --radius-sm: 3px;
    --shadow-sm: 0 1px 2px rgba(20, 20, 20, 0.08);
    --shadow-md: 0 6px 20px rgba(20, 20, 20, 0.14);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--color-ink);
    background: var(--color-offwhite);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* ---------- Accessibility: skip link ---------- */
.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--color-white);
    color: var(--color-black);
    padding: 10px 16px;
    font-weight: 600;
    z-index: 1000;
    border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
    left: 0;
}

:focus-visible {
    outline: 3px solid var(--color-red);
    outline-offset: 2px;
}

/* ===================================================================
   GOVERNMENT TOP STRIP
   =================================================================== */
.gov-strip {
    position: relative;
    height: var(--strip-h);
    background: var(--color-black);
    color: #D8D6D4;
    font-size: 12.5px;
    overflow: hidden;
    border-bottom: 3px solid var(--color-red);
}

.gov-strip__chakra {
    position: absolute;
    right: 18px;
    top: 50%;
    width: 60px;
    height: 60px;
    transform: translateY(-50%);
    opacity: 0.14;
    animation: chakra-spin 40s linear infinite;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .gov-strip__chakra {
        animation: none;
    }
}

@keyframes chakra-spin {
    from {
        transform: translateY(-50%) rotate(0deg);
    }

    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

.gov-strip__inner {
    max-width: var(--shell-max);
    margin: 0 auto;
    height: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.gov-strip__label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    letter-spacing: .2px;
    white-space: nowrap;
}

.gov-strip__label strong {
    color: var(--color-white);
    font-weight: 600;
}

.gov-strip__actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.gov-strip__actions button {
    background: none;
    border: none;
    color: #D8D6D4;
    font-size: 12.5px;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.gov-strip__actions button:hover {
    color: var(--color-white);
}

.gov-strip__lang {
    display: flex;
    border: 1px solid #3A3A3A;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.gov-strip__lang button {
    padding: 4px 10px;
    border-right: 1px solid #3A3A3A;
}

.gov-strip__lang button:last-child {
    border-right: none;
}

.gov-strip__lang button[aria-pressed="true"] {
    background: var(--color-red);
    color: var(--color-white);
    font-weight: 600;
}

/* ===================================================================
   HEADER
   =================================================================== */
.site-header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header__inner {
    max-width: var(--shell-max);
    margin: 0 auto;
    min-height: var(--header-h);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Brand: left side of header */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: auto;
}

.brand__emblem {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
}

.brand__text {
    line-height: 1.15;
}

.brand__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    color: var(--color-black);
}

.brand__subtitle {
    font-size: 11.5px;
    color: var(--color-muted);
    font-family: var(--font-mono);
    letter-spacing: .03em;
}

/* Profile navigation — right side of header */
.profile-nav {
    position: relative;
}

.profile-nav__trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--color-offwhite);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 6px 14px 6px 6px;
}

.profile-nav__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-red);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
}

.profile-nav__meta {
    text-align: left;
    line-height: 1.2;
}

.profile-nav__name {
    font-weight: 600;
    font-size: 13.5px;
    color: var(--color-ink);
}

.profile-nav__role {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.profile-nav__caret {
    color: var(--color-muted);
    margin-left: 2px;
    transition: transform .15s ease;
}

.profile-nav[data-open="true"] .profile-nav__caret {
    transform: rotate(180deg);
}

.profile-nav__menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 8px;
    display: none;
    z-index: 50;
}

.profile-nav__menu--right {
    left: auto;
    right: 0;
}

.profile-nav[data-open="true"] .profile-nav__menu {
    display: block;
}

.profile-nav__menu a,
.profile-nav__menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    color: var(--color-ink);
}

.profile-nav__menu a:hover,
.profile-nav__menu button:hover {
    background: var(--color-offwhite);
}

.profile-nav__menu .divider {
    height: 1px;
    background: var(--color-border);
    margin: 6px 2px;
}

.profile-nav__menu .signout {
    color: var(--color-red-dark);
}

.sidebar-toggle {
    display: none;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    color: var(--color-black);
}

/* ===================================================================
   SHELL: sidebar + main content
   =================================================================== */
.layout-shell {
    max-width: var(--shell-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    gap: 24px;
    padding: 24px 20px 40px;
    align-items: start;
}

/* ---------- Sidebar ---------- */
.sidebar {
    position: sticky;
    top: calc(var(--header-h) + var(--strip-h) + 16px);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Site navigation (moved from header) */
.sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: var(--shadow-sm);
}

.sidebar__nav a {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-black);
}

.sidebar__nav a:hover {
    background: var(--color-offwhite);
}

.sidebar__nav a.is-active {
    background: var(--color-black);
    color: var(--color-white);
    font-weight: 600;
}

.sidebar__panel {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.sidebar__panel-head {
    padding: 14px 16px 0;
}

.sidebar__panel-head h2 {
    font-family: var(--font-display);
    font-size: 15px;
    margin: 0 0 12px;
    color: var(--color-black);
}

/* News tabs: Approved / Published */
.news-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-border);
    padding: 0 16px;
    gap: 4px;
}

.news-tabs button {
    background: none;
    border: none;
    padding: 10px 4px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-muted);
    border-bottom: 2px solid transparent;
    margin-right: 14px;
}

.news-tabs button[aria-selected="true"] {
    color: var(--color-black);
    border-bottom-color: var(--color-red);
}

.news-list {
    list-style: none;
    margin: 0;
    padding: 6px 8px 12px;
    max-height: 360px;
    overflow-y: auto;
}

.news-list[hidden] {
    display: none;
}

.news-list li+li {
    border-top: 1px solid var(--color-border);
}

.news-list a {
    display: block;
    padding: 10px 8px;
    border-radius: var(--radius-sm);
}

.news-list a:hover {
    background: var(--color-offwhite);
}

.news-item__title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-ink);
    display: block;
    margin-bottom: 5px;
    line-height: 1.35;
}

.news-item__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--color-muted);
}

.status-pill {
    font-family: var(--font-mono);
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 2px 7px;
    border-radius: 999px;
    font-weight: 600;
}

.status-pill--approved {
    background: #F0DCDF;
    color: var(--color-red-dark);
}

.status-pill--published {
    background: #1F1F1F;
    color: var(--color-white);
}

/* Sidebar quick actions */
.sidebar__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 13px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
    background: none;
    text-align: left;
}

.action-btn svg {
    flex-shrink: 0;
}

.action-btn--primary {
    background: var(--color-red);
    color: var(--color-white);
}

.action-btn--primary:hover {
    background: var(--color-red-dark);
}

.action-btn--accent {
    background: var(--color-white);
    color: var(--color-black);
    border-color: var(--color-black);
}

.action-btn--accent:hover {
    background: var(--color-offwhite);
}

.action-btn--outline {
    background: var(--color-white);
    color: var(--color-red-dark);
    border-color: var(--color-red);
}

.action-btn--outline:hover {
    background: #FBEDEF;
}

/* Expandable action group (Apply for ID / ID Renewal) */
.action-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.action-btn--toggle {
    justify-content: flex-start;
}

.action-btn__label {
    flex: 1;
}

.action-btn__chevron {
    color: var(--color-muted);
    transition: transform .15s ease;
    flex-shrink: 0;
}

.action-btn--toggle[aria-expanded="true"] .action-btn__chevron {
    transform: rotate(180deg);
    color: var(--color-red);
}

.action-submenu {
    list-style: none;
    margin: 0;
    padding: 4px 0 4px 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    border-left: 2px solid var(--color-border);
    margin-left: 15px;
}

.action-submenu[hidden] {
    display: none;
}

.action-submenu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-ink);
}

.action-submenu a:hover {
    background: var(--color-offwhite);
    color: var(--color-red-dark);
}

.action-submenu__tag {
    font-family: var(--font-mono);
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 600;
    color: var(--color-muted);
    background: var(--color-offwhite);
    padding: 2px 7px;
    border-radius: 999px;
    white-space: nowrap;
}

.action-submenu a:hover .action-submenu__tag {
    background: #F0DCDF;
    color: var(--color-red-dark);
}

/* ---------- Main content ---------- */
.main-content {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 28px 30px;
    min-height: 60vh;
    box-shadow: var(--shadow-sm);
}

.main-content h1 {
    font-family: var(--font-display);
    color: var(--color-black);
    margin-top: 0;
}

/* ===================================================================
   FOOTER
   =================================================================== */
.site-footer {
    background: var(--color-black);
    color: #C9C7C5;
    margin-top: 29px;
    border-top: 3px solid var(--color-red);
}

.site-footer__inner {
    max-width: var(--shell-max);
    margin: 0 auto;
    padding: 22px 20px;
    text-align: center;
    font-size: 12.5px;
    line-height: 1.7;
}

.site-footer__inner strong {
    color: var(--color-white);
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 900px) {
    .layout-shell {
        grid-template-columns: 1fr;
    }

    .sidebar-toggle {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px;
        background: var(--color-offwhite);
        padding: 20px 16px;
        transform: translateX(-100%);
        transition: transform .2s ease;
        z-index: 200;
        box-shadow: var(--shadow-md);
        overflow-y: auto;
    }

    .sidebar[data-open="true"] {
        transform: translateX(0);
    }

    .sidebar-scrim {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(20, 20, 20, 0.45);
        z-index: 150;
    }

    .sidebar-scrim[data-open="true"] {
        display: block;
    }

    .brand__subtitle {
        display: none;
    }
}

@media (max-width: 560px) {
    .gov-strip__label span.gov-strip__full {
        display: none;
    }

    .site-header__inner {
        gap: 12px;
        padding: 10px 14px;
    }

    .profile-nav__meta {
        display: none;
    }

    .layout-shell {
        padding: 16px 14px 32px;
    }

    .main-content {
        padding: 20px 18px;
    }
}

.header-inner {
    width: 100%;
    max-width: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

/* ── LOGO: scales with viewport ── */
.Kanglasha {
    width: clamp(48px, 7vw, 72px);
    height: clamp(48px, 7vw, 72px);
    flex-shrink: 0;
}

/* ── TITLE: always right of logo ── */
/* .header-text {
      flex: 1 1 0;
      min-width: 0;
    } */

.header-text h1 {
    font-family: 'Tiro Devanagari Latin', serif;
    font-size: clamp(14px, 2.2vw, 24px);
    font-style: italic;
    color: var(--gov-navy);
    margin: 0 0 0px;
    font-weight: 700;
    padding-left: 7px;
}

.header-text p {
    font-size: 12px;
    color: var(--gov-grey);
    margin: 0;
}

/* Meitei Mayek Styling */
.meitei-mayek {
    font-family: "Noto Sans Meetei Mayek", sans-serif;
    font-size: clamp(11px, 2.2vw, 16px);
    font-weight: 500;
    /* Standard weight */
    font-style: normal;
    /* Fix: was "bold" (invalid) */
    color: #ff7a00;
    letter-spacing: 0;
    /* Fix: was -1px (breaks glyphs) */
    line-height: 1.3;
    margin-top: 0px;
    margin-bottom: 2px;
    padding-top: 0px;
}


/* Sidebar hide  */
.layout-shell--no-sidebar {
    grid-template-columns: 1fr;
    /* adjust if your layout-shell uses a different display type */
}

.layout-shell--no-sidebar .main-content {
    margin-left: 0;
    width: 100%;
}

/* ===================================================================
   GUEST HEADER NAV — Home & Notifications buttons (Login / Register)
   =================================================================== */
.header-guest-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.header-guest-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-ink);
    background: var(--color-offwhite);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: background .15s ease, border-color .15s ease, color .15s ease;
    white-space: nowrap;
    text-decoration: none;
}

.header-guest-btn:hover {
    background: var(--color-white);
    border-color: var(--color-red);
    color: var(--color-red-dark);
}

.header-guest-btn svg {
    flex-shrink: 0;
}

.header-guest-btn--outline {
    background: var(--color-white);
    border-color: var(--color-red);
    color: var(--color-red-dark);
}

.header-guest-btn--outline:hover {
    background: #FBEDEF;
    border-color: var(--color-red-dark);
}

@media (max-width: 480px) {
    .header-guest-btn {
        font-size: 12px;
        padding: 7px 10px;
        gap: 5px;
    }
}