:root {
    --blue-1: #0b3d91;
    --blue-2: #1257c2;
    --blue-3: #0a2a63;
    --sky: #4f8ef7;
    --saffron: #ff9933;
    --green: #138808;
    --navy: #0b3d66;
    --gold: #c9a227;
    --maroon: #7a1f2b;
    --bg: #f4f7fb;
    --card-bg: #ffffff;
    --text: #232323;
    --muted: #6b7280;
    --border: #e3e8f0;
    --shadow: 0 2px 10px rgba(11,61,145,0.08);
    --shadow-hover: 0 10px 28px rgba(11,61,145,0.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Noto Sans Devanagari", "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    animation: bodyFadeIn 0.5s ease;
}

@keyframes bodyFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---------- Top strip ---------- */
.top-strip {
    background: linear-gradient(90deg, var(--saffron), #ffffff 50%, var(--green));
    height: 6px;
    width: 100%;
    background-size: 200% 100%;
    animation: stripSlide 6s linear infinite;
}

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

/* ---------- Header ---------- */
.site-header {
    background: linear-gradient(120deg, var(--blue-3) 0%, var(--blue-1) 45%, var(--blue-2) 100%);
    background-size: 250% 250%;
    animation: gradientShift 12s ease infinite;
    color: #fff;
    padding: 26px 20px;
    box-shadow: 0 4px 18px rgba(11,61,145,0.28);
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.site-header::before,
.site-header::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.10) 0%, transparent 70%);
}

.site-header::before {
    top: -80px; right: -60px;
    width: 260px; height: 260px;
    animation: floatBlob 8s ease-in-out infinite;
}

.site-header::after {
    bottom: -90px; left: 5%;
    width: 200px; height: 200px;
    animation: floatBlob 10s ease-in-out infinite reverse;
}

@keyframes floatBlob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(15px, -15px) scale(1.08); }
}

.header-inner {
    max-width: 1150px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    z-index: 1;
    animation: slideDown 0.6s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-16px); }
    to { opacity: 1; transform: translateY(0); }
}

.emblem {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 0 0 3px var(--gold), 0 4px 14px rgba(0,0,0,0.25);
    animation: emblemPulse 3.5s ease-in-out infinite;
}

@keyframes emblemPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 3px var(--gold), 0 4px 14px rgba(0,0,0,0.25); }
    50% { transform: scale(1.06); box-shadow: 0 0 0 5px var(--gold), 0 6px 20px rgba(0,0,0,0.3); }
}

.header-text h1 {
    margin: 0;
    font-size: 25px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.header-text p {
    margin: 4px 0 0;
    font-size: 14.5px;
    opacity: 0.94;
}

.header-text .sub-en {
    margin-top: 2px;
    font-size: 12.5px;
    opacity: 0.78;
    font-style: italic;
}

/* ---------- Nav ---------- */
.site-nav {
    background: var(--blue-3);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-inner {
    max-width: 1150px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
}

.site-nav a {
    color: #fff;
    text-decoration: none;
    padding: 13px 22px;
    font-size: 14.5px;
    font-weight: 600;
    opacity: 0.85;
    border-bottom: 3px solid transparent;
    position: relative;
    transition: all 0.25s;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 50%; bottom: 0;
    width: 0; height: 3px;
    background: var(--saffron);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.site-nav a:hover {
    opacity: 1;
    background: rgba(255,255,255,0.08);
}

.site-nav a:hover::after { width: 60%; }

.site-nav a.active {
    opacity: 1;
    border-bottom-color: var(--saffron);
    background: rgba(255,255,255,0.12);
}

/* ---------- Container ---------- */
.container {
    max-width: 1150px;
    margin: 30px auto;
    padding: 0 20px 40px;
}

.page-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
    border-left: 5px solid var(--saffron);
    padding-left: 14px;
    animation: fadeInUp 0.5s ease;
}

.page-title-bar h2 {
    margin: 0;
    font-size: 22px;
    background: linear-gradient(90deg, var(--blue-1), var(--blue-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.page-title-bar span.count-badge {
    background: linear-gradient(120deg, var(--blue-1), var(--blue-2));
    color: #fff;
    font-size: 12.5px;
    padding: 5px 14px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(11,61,145,0.3);
}

.breadcrumb {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 14px;
}

.breadcrumb a { color: var(--blue-2); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Cards / list items ---------- */
.card-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.item-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease both;
}

.card-list .item-card:nth-child(1) { animation-delay: 0.03s; }
.card-list .item-card:nth-child(2) { animation-delay: 0.08s; }
.card-list .item-card:nth-child(3) { animation-delay: 0.13s; }
.card-list .item-card:nth-child(4) { animation-delay: 0.18s; }
.card-list .item-card:nth-child(5) { animation-delay: 0.23s; }
.card-list .item-card:nth-child(6) { animation-delay: 0.28s; }
.card-list .item-card:nth-child(7) { animation-delay: 0.33s; }
.card-list .item-card:nth-child(8) { animation-delay: 0.38s; }

.item-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--blue-1), var(--sky));
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease;
}

.item-card:hover::before { transform: scaleY(1); }

.item-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
    border-color: var(--sky);
}

.item-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: #eef3fc;
    transition: transform 0.3s ease;
}

.item-card:hover .item-icon { transform: scale(1.1) rotate(-4deg); }

.item-body { flex: 1; min-width: 0; }

.item-title {
    font-size: 15.5px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 6px;
}

.item-title a {
    color: inherit;
    text-decoration: none;
    background-image: linear-gradient(var(--blue-2), var(--blue-2));
    background-repeat: no-repeat;
    background-size: 0% 2px;
    background-position: 0 100%;
    transition: background-size 0.3s ease, color 0.3s ease;
    padding-bottom: 1px;
}

.item-title a:hover {
    color: var(--blue-2);
    background-size: 100% 2px;
}

.item-meta {
    font-size: 12.5px;
    color: var(--muted);
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 12px;
    letter-spacing: 0.4px;
    vertical-align: middle;
    margin-left: 8px;
}

.badge-new {
    background: #ffe8e8;
    color: #c0392b;
    animation: blink-new 1.4s ease-in-out infinite;
}

@keyframes blink-new {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.badge-blink {
    background: #fff4d6;
    color: #a67c00;
    animation: blink-new 1.1s ease-in-out infinite;
}

.download-btn {
    flex-shrink: 0;
    background: linear-gradient(120deg, var(--green), #0d5f06);
    color: #fff;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 8px;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    align-self: center;
    box-shadow: 0 3px 10px rgba(19,136,8,0.3);
}

.download-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 16px rgba(19,136,8,0.4);
}

.link-btn {
    background: linear-gradient(120deg, var(--blue-1), var(--blue-2));
    box-shadow: 0 3px 10px rgba(11,61,145,0.3);
}

.link-btn:hover {
    box-shadow: 0 6px 16px rgba(11,61,145,0.4);
}

/* Sequential numbering */
.seq-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-1), var(--blue-2));
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(11,61,145,0.35);
}

/* ---------- Instructions specific ---------- */
.instruction-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--saffron);
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    animation: fadeInUp 0.5s ease both;
}

.card-list .instruction-item:nth-child(1) { animation-delay: 0.03s; }
.card-list .instruction-item:nth-child(2) { animation-delay: 0.08s; }
.card-list .instruction-item:nth-child(3) { animation-delay: 0.13s; }
.card-list .instruction-item:nth-child(4) { animation-delay: 0.18s; }
.card-list .instruction-item:nth-child(5) { animation-delay: 0.23s; }
.card-list .instruction-item:nth-child(6) { animation-delay: 0.28s; }

.instruction-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-left-color: var(--blue-2);
}

.instruction-item p {
    margin: 0;
    font-size: 15px;
}

/* ---------- Empty state ---------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px dashed var(--border);
    animation: fadeInUp 0.5s ease;
}

.empty-state .emoji {
    font-size: 42px;
    margin-bottom: 10px;
    display: inline-block;
    animation: floatIcon 2.4s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ---------- Footer ---------- */
.site-footer {
    background: linear-gradient(120deg, var(--blue-3), var(--blue-1));
    color: #eaf1ff;
    text-align: center;
    padding: 24px 15px;
    font-size: 13px;
    margin-top: 50px;
}

.site-footer strong { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .header-inner { flex-direction: column; text-align: center; }
    .header-text h1 { font-size: 19px; }
    .header-text p { font-size: 13px; }
    .item-card { flex-direction: column; }
    .download-btn { align-self: flex-start; }
    .nav-inner { justify-content: center; }
    .site-nav a { padding: 11px 14px; font-size: 13px; }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
