/*
 * NCIS Public Web Theme
 * Visual refresh only; backend behavior and endpoints unchanged.
 */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;700&family=Roboto:wght@400;500;700&display=swap');

:root {
    --saffron: #ff9933;
    --white: #ffffff;
    --india-green: #138808;
    --ashoka-blue: #0a3d91;
    --navy-900: #0f2347;
    --navy-700: #1c3c75;
    --slate-900: #111827;
    --slate-700: #374151;
    --slate-500: #6b7280;
    --slate-300: #d1d5db;
    --slate-200: #e5e7eb;
    --slate-100: #f3f4f6;
    --surface: #f7f9fc;
    --success: #1f7a34;
    --warning: #b45309;
    --info: #1d4ed8;
    --danger: #be123c;
    --primary-dark: #0f2347;
    --primary-medium: #0a3d91;
    --primary-light: #3f5f99;
    --accent-orange: #ff9933;
    --accent-gold: #d5b96a;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --shadow-sm: 0 2px 6px rgba(15, 35, 71, 0.08);
    --shadow-md: 0 10px 24px rgba(15, 35, 71, 0.12);
    --shadow-lg: 0 18px 35px rgba(15, 35, 71, 0.15);
    --font-heading: 'Roboto', 'Noto Sans', Arial, sans-serif;
    --font-body: 'Noto Sans', 'Roboto', Arial, sans-serif;
    --font-mono: 'Consolas', 'Courier New', monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--slate-900);
    background: #f5f5f5;
    min-height: 100vh;
}

a {
    color: var(--ashoka-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--navy-900);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.gov-band {
    height: 6px;
    background: linear-gradient(90deg, var(--saffron) 0%, var(--saffron) 33.33%, var(--white) 33.33%, var(--white) 66.66%, var(--india-green) 66.66%);
}

.site-header {
    background: #0a2b60;
    color: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 20;
}

.flash-announcement {
    background: #001a4d;
    border-top: 3px solid var(--saffron);
    border-bottom: 2px solid rgba(255, 153, 51, 0.4);
    padding: 0.3rem 0;
    font-size: 0.95rem;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.flash-content {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.flash-label {
    font-weight: 700;
    color: var(--saffron);
    letter-spacing: 1px;
    white-space: nowrap;
    font-size: 1.05rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    animation: flash-blink 1.5s infinite;
}

.flash-text {
    color: #fff;
    font-weight: 500;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

@keyframes flash-blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.header-top {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.header-ncis-logo {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    line-height: 0;
    box-shadow: none;
}

.header-ncis-logo img {
    height: 73px;
    width: auto;
    display: block;
    background: transparent;
}

.header-title {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
}

.title-hindi {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.3px;
}

.title-english {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--white);
    letter-spacing: 0.2px;
}

.title-government {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.1px;
    margin-top: 0.25rem;
}

/* Header logos (uses the three user-provided images) */
/* header logos are now explicit DOM elements (.header-logos) for accessibility */
.header-logos {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.header-logos img {
    height: 50px;
    width: auto;
    display: block;
}

.header-logos img.small {
    height: 40px;
}

.header-logos img.ministry-logo {
    height: 53px;
}

.logo {
    display: none;
}

.logo-icon {
    display: none;
}

.logo-text {
    display: none;
}

.logo-text h1 {
    font-family: 'Source Sans 3', var(--font-body);
    font-size: clamp(1rem, 1.8vw, 1.4rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.tagline {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.88;
    letter-spacing: 0.01em;
}

.main-nav {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.2rem;
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.3rem 0;
    margin: 0;
}

.main-nav a {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.3rem 0.8rem;
    border-radius: 2px;
    font-size: 0.95rem;
    font-weight: 400;
    display: block;
    text-decoration: none;
    transition: color 0.15s ease;
}

.main-nav a:hover {
    color: var(--white);
}

.main-nav a.active {
    color: var(--saffron);
    font-weight: 500;
}

.hero {
    position: relative;
    max-height: 90vh;
    overflow: hidden;
    border-bottom: 1px solid var(--slate-300);
}

.hero-image {
    width: 100%;
    height: 100%;
    min-height: 350px;
    object-fit: cover;
    filter: saturate(0.8);
}

.hero-video {
    width: 100%;
    height: 100%;
    min-height: 350px;
    object-fit: cover;
    display: block;
    filter: saturate(0.85);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.35);
}

.hero-content {
    width: min(900px, 92%);
    text-align: center;
    color: var(--white);
}

.hero-content h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.6rem;
    letter-spacing: -0.02em;
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    opacity: 0.96;
}

.hero-kicker {
    display: inline-block;
    margin-bottom: 0.7rem;
    padding: 0.25rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 3px;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(6, 19, 43, 0.35);
}

.hero-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-outline {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--white);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
}

.hero-metrics {
    margin-top: 1.2rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 0.5rem;
}

.hero-metric {
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 3px;
    padding: 0.4rem 0.5rem;
    background: rgba(8, 25, 56, 0.35);
}

.hero-metric strong {
    display: block;
    font-size: 1.05rem;
}

.hero-metric span {
    font-size: 0.8rem;
    opacity: 0.9;
}

.main-content {
    max-width: 1240px;
    margin: 0 auto;
    padding: 2rem 1.1rem 2.5rem;
}

.card {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 1.35rem;
    margin-bottom: 1.3rem;
}

.card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.card h2,
.card h3,
.card h4 {
    font-family: var(--font-heading);
    color: var(--navy-900);
}

.card h2 {
    margin-bottom: 0.6rem;
    font-size: clamp(1.2rem, 2.3vw, 1.65rem);
}

.card h3 {
    margin-top: 0.95rem;
    margin-bottom: 0.5rem;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.grid {
    display: grid;
    gap: 1rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.notice {
    border-left: 4px solid;
    border-radius: 2px;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
}

.notice strong {
    display: block;
    margin-bottom: 0.15rem;
}

.notice-info {
    background: #eaf2ff;
    border-color: var(--info);
    color: #123770;
}

.notice-warning {
    background: #fff6e9;
    border-color: var(--warning);
    color: #793300;
}

.notice-success {
    background: #ecfdf3;
    border-color: var(--success);
    color: #135527;
}

.form-group {
    margin-bottom: 0.85rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--slate-700);
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid #b6c1d1;
    border-radius: 2px;
    padding: 0.64rem 0.72rem;
    background: var(--white);
    font-family: var(--font-body);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ashoka-blue);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.14);
}

.btn {
    display: inline-block;
    padding: 0.5rem 1.1rem;
    border: 1px solid #0a3d91;
    border-radius: 2px;
    background: #0a3d91;
    color: var(--white);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
    background: #0a2b60;
    border-color: #0a2b60;
}

.btn-secondary {
    background: #475569;
    border-color: #475569;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.56rem 0.6rem;
    border-bottom: 1px solid var(--slate-200);
    vertical-align: top;
}

.data-table th {
    background: #eaf2ff;
    color: #102a52;
    font-weight: 700;
}

.status-chip {
    display: inline-block;
    padding: 0.18rem 0.56rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 700;
}

.status-ok {
    color: #0b5f1f;
    background: #dcfce7;
}

.status-review {
    color: #78350f;
    background: #fef3c7;
}

.diagram {
    background: #0d1b35;
    color: #dce9ff;
    border: 1px solid #1e3360;
    border-radius: 2px;
    padding: 0.9rem;
    font-family: var(--font-mono);
    font-size: 0.79rem;
    overflow-x: auto;
    white-space: pre;
}

.cred-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.7rem;
}

.cred-item {
    border: 1px solid #cde0ff;
    background: #f7fbff;
    border-radius: 2px;
    padding: 0.8rem;
}

.gov-seal {
    width: 86px;
    height: 86px;
    margin: 0 auto 0.7rem;
    border-radius: 50%;
    border: 3px solid #d5b96a;
    background: radial-gradient(circle at 50% 40%, #f7e8bc 0%, #e6cd81 55%, #cfad58 100%);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.36);
    display: grid;
    place-items: center;
    color: #8b5e00;
    font-weight: 800;
    font-family: var(--font-heading);
}

.site-footer {
    margin-top: 1.8rem;
    color: #e6ecf9;
    background: linear-gradient(180deg, #172f5d 0%, #0d1f42 100%);
    border-top: 4px solid var(--saffron);
    padding: 1.5rem 1.2rem;
}

.footer-content {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1.05rem;
}

.footer-section h4 {
    margin-bottom: 0.45rem;
    color: #ffffff;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.2rem;
}

.footer-section a {
    color: #cfddff;
}

.footer-bottom {
    max-width: 1240px;
    margin: 1rem auto 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 0.8rem;
    font-size: 0.89rem;
    text-align: center;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--slate-500);
}

.text-small {
    font-size: 0.9rem;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 1.5rem;
}

.hidden-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

@media (max-width: 920px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-nav ul {
        gap: 0.35rem;
    }
}

@media (max-width: 680px) {
    .header-meta {
        font-size: 0.75rem;
        flex-direction: column;
        gap: 0.18rem;
    }

    .main-content {
        padding: 1.2rem 0.8rem 1.8rem;
    }

    .hero {
        min-height: 295px;
    }

    .hero-image {
        min-height: 295px;
    }

    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .header-ncis-logo img {
        height: 57px;
    }
}

/*
Config path: /etc/northstar/webapp.conf
API endpoint: https://api-internal.northstar-research.org/v2/
Legacy auth: Basic dGVzdHVzZXI6dGVzdHBhc3M= (deprecated)
*/