/* ==========================================================================
   HP Visual Publications Frontend — Professional Design
   Covers: grid · latest · category_archive · archive · economic_survey_timeline
   ========================================================================== */

/* ── Design Tokens ─────────────────────────────────────────────────── */
:root {
    --hp-vp-primary:       #0d3b6e;
    --hp-vp-primary-dark:  #092c52;
    --hp-vp-primary-light: #e8f0fa;
    --hp-vp-accent:        #c8973a;
    --hp-vp-accent-light:  #fdf3e3;
    --hp-vp-surface:       #ffffff;
    --hp-vp-surface-2:     #f7f9fc;
    --hp-vp-border:        #dde3ec;
    --hp-vp-text:          #1a2636;
    --hp-vp-text-muted:    #6b7a8d;
    --hp-vp-radius:        12px;
    --hp-vp-shadow:        0 2px 14px rgba(13,59,110,.07);
    --hp-vp-shadow-hover:  0 10px 32px rgba(13,59,110,.16);
    --hp-vp-transition:    all .24s cubic-bezier(.4,0,.2,1);
}

/* ==========================================================================
   VISUAL PUBLICATION GRID / LATEST CARDS
   [visual_publication_grid]  [visual_publication_latest]
   ========================================================================== */

.hp-vpub-grid-wrap {
    margin-bottom: 32px;
}

.hp-vpub-section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--hp-vp-primary);
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--hp-vp-accent);
    display: inline-block;
}

.hp-vpub-grid {
    display: grid;
    grid-template-columns: repeat(var(--hp-cols, 3), 1fr);
    gap: 22px;
}

@media (max-width: 992px) {
    .hp-vpub-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 600px) {
    .hp-vpub-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
}
@media (max-width: 440px) {
    .hp-vpub-grid { grid-template-columns: 1fr; }
}

/* ── Card ────────────────────────────────────────────────────────────── */
.hp-vpub-card {
    border-radius: var(--hp-vp-radius);
    overflow: hidden;
    position: relative;
    aspect-ratio: 3 / 4;
    cursor: pointer;
    transition: var(--hp-vp-transition);
    background: #1e293b;
    border: 0.5px solid var(--hp-vp-border);
}

.hp-vpub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,.18);
}

.hp-vpub-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.hp-vpub-card:hover .hp-vpub-card-img {
    transform: scale(1.04);
}

.hp-vpub-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 30%,
        rgba(0,0,0,.78) 100%
    );
}

.hp-vpub-card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 13px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hp-vpub-card-cat {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: #c8973a;
}

.hp-vpub-card-title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1.35;
    display: -webkit-box;

    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp-vpub-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

.hp-vpub-card-year {
    font-size: 11px;
    color: rgba(255,255,255,.6);
}

.hp-vpub-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: #0d3b6e;
    color: #fff;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    border: 0.5px solid rgba(255,255,255,.15);
    transition: background .18s;
}

.hp-vpub-card-btn:hover {
    background: #c8973a;
    color: #fff;
}
/* ── Empty state ────────────────────────────────────────────────────── */
.hp-vpub-empty {
    text-align: center;
    color: var(--hp-vp-text-muted);
    padding: 48px 20px;
    border: 2px dashed var(--hp-vp-border);
    border-radius: var(--hp-vp-radius);
    font-size: 15px;
}

/* ==========================================================================
   ARCHIVE FILTERS  (shared by archive + category_archive)
   ========================================================================== */

.hp-vpub-archive-wrap {
    max-width: 1100px;
    margin: 0 auto;
}

.hp-vpub-filters {
    background: var(--hp-vp-surface);
    border: 1px solid var(--hp-vp-border);
    border-radius: var(--hp-vp-radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: var(--hp-vp-shadow);
}

.hp-vpub-filter-row {
    display: flex;
   
    gap: 10px;
    align-items: center;
}

.hp-vpub-search-input,
.hp-vpub-filter-select {
    height: 40px;
    padding: 0 13px;
    border: 1px solid var(--hp-vp-border);
    border-radius: 8px;
    font-size: 13.5px;
    color: var(--hp-vp-text);
    background: var(--hp-vp-surface-2);
    transition: border-color .18s, box-shadow .18s;
    outline: none;
}

.hp-vpub-search-input { min-width: 220px; }
.hp-vpub-filter-select { min-width: 165px; cursor: pointer; }

.hp-vpub-search-input:focus,
.hp-vpub-filter-select:focus {
    border-color: var(--hp-vp-primary);
    box-shadow: 0 0 0 3px rgba(13,59,110,.1);
    background: var(--hp-vp-surface);
}

.hp-vpub-filter-btn,
.hp-vpub-filter-reset {
    height: 40px;
    padding: 0 18px;
    border: none;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: var(--hp-vp-transition);
}

.hp-vpub-filter-btn {
    background: var(--hp-vp-primary);
    color: #fff;
    border: 1px solid transparent;
}

.hp-vpub-filter-btn:hover {
    background: var(--hp-vp-primary-dark);
    box-shadow: 0 4px 12px rgba(13,59,110,.25);
    transform: translateY(-1px);
    color: #fff;
}

.hp-vpub-filter-reset {
    background: transparent;
    color: var(--hp-vp-text-muted);
    border: 1px solid var(--hp-vp-border);
}

.hp-vpub-filter-reset:hover {
    background: var(--hp-vp-surface-2);
    color: var(--hp-vp-text);
    border-color: #aab0bb;
}

/* Overview page */
.hp-vpub-overview-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 40px;
}

/* ── Mobile category dropdown (hidden on desktop) ── */
.hp-vpub-overview-mobile-filter {
    display: none;
    margin-bottom: 16px;
}

.hp-vpub-overview-mobile-select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--hp-vp-border);
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--hp-vp-text);
    background: var(--hp-vp-surface);
    box-shadow: var(--hp-vp-shadow);
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230d3b6e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    transition: border-color .18s, box-shadow .18s;
}

.hp-vpub-overview-mobile-select:focus {
    border-color: var(--hp-vp-primary);
    box-shadow: 0 0 0 3px rgba(13,59,110,.12);
}

/* Desktop layout */
.hp-vpub-overview-inner {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: flex-start;
}

.hp-vpub-overview-sidebar {
    position: sticky;
    top: 110px;
    align-self: start;
}

.hp-vpub-overview-sidebar-card {
    background: var(--hp-vp-surface);
    border: 1px solid var(--hp-vp-border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--hp-vp-shadow);
}

.hp-vpub-overview-sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--hp-vp-text);
    margin: 0 0 18px;
}

.hp-vpub-overview-filter-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hp-vpub-overview-filter-link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 12px 16px;
    border-radius: 18px;
    background: var(--hp-vp-surface-2);
    color: var(--hp-vp-text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--hp-vp-transition);
    border: 1px solid transparent;
}

.hp-vpub-overview-filter-link:hover,
.hp-vpub-overview-filter-link.active {
    background: var(--hp-vp-primary);
    color: #fff;
    border-color: var(--hp-vp-primary);
}

.hp-vpub-overview-main {
    min-width: 0;
}

/* ── Responsive: Overview ── */
@media (max-width: 860px) {
    .hp-vpub-overview-wrap {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding: 0;
    }

    /* Show dropdown, hide sidebar */
    .hp-vpub-overview-mobile-filter {
        display: block;
    }

    .hp-vpub-overview-sidebar {
        display: none;
    }

    /* Single-column full-width layout */
    .hp-vpub-overview-inner {
        display: block;
    }

    .hp-vpub-overview-main {
        width: 100%;
    }
}

.hp-vpub-overview-header {
    margin-bottom: 28px;
}

.hp-vpub-overview-main-title {
    margin: 0 0 12px;
    font-size: 2rem;
    font-weight: 800;
    color: var(--hp-vp-primary);
    line-height: 1.06;
}

.hp-vpub-overview-main-subtitle {
    margin: 0;
    color: var(--hp-vp-text-muted);
    font-size: 1rem;
    max-width: 760px;
}

.hp-vpub-overview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .hp-vpub-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .hp-vpub-overview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.hp-vpub-overview-card {
    background: var(--hp-vp-surface);
    border: 1px solid var(--hp-vp-border);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--hp-vp-shadow);
    transition: var(--hp-vp-transition);
}

.hp-vpub-overview-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--hp-vp-shadow-hover);
}

.hp-vpub-overview-card-hero {
    min-height: 170px;
    width: 100%;
}

.hp-vpub-overview-card-body {
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hp-vpub-overview-card-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--hp-vp-surface-2);
    color: var(--hp-vp-primary);
}

.hp-vpub-overview-card-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--hp-vp-text);
    line-height: 1.3;
}

.hp-vpub-overview-card-text {
    margin: 0;
    color: var(--hp-vp-text-muted);
    font-size: .95rem;
    line-height: 1.7;
    min-height: 4rem;
}

.hp-vpub-overview-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hp-vpub-overview-card-year {
    color: var(--hp-vp-text-muted);
    font-size: .95rem;
}

.hp-vpub-overview-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 16px;
    background: var(--hp-vp-primary);
    color: #fff;
    text-decoration: none;
    font-size: .95rem;
    font-weight: 700;
    transition: var(--hp-vp-transition);
}

.hp-vpub-overview-card-btn:hover {
    background: var(--hp-vp-primary-dark);
}

.hp-vpub-hero-year_book {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
}

.hp-vpub-hero-gender_stats {
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
}

.hp-vpub-hero-urban_stats {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
}

.hp-vpub-hero-data_viz {
    background: linear-gradient(135deg, #a855f7 0%, #4f46e5 100%);
}

.hp-vpub-hero-rti_manual {
    background: linear-gradient(135deg, #facc15 0%, #fb923c 100%);
}

.hp-vpub-hero-default {
    background: linear-gradient(135deg, #475569 0%, #0f172a 100%);
}

/* Results count */
.hp-vpub-results-count,
.hp-pub-results-count {
    font-size: 13px;
    color: var(--hp-vp-text-muted);
    margin: 0 0 14px;
}

/* Pagination */
.hp-vpub-pagination,
.hp-pub-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 22px;
}

.hp-vpub-page-btn,
.hp-pub-page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--hp-vp-border);
    color: var(--hp-vp-text);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--hp-vp-transition);
    background: var(--hp-vp-surface);
}

.hp-vpub-page-btn:hover,
.hp-pub-page-btn:hover {
    border-color: var(--hp-vp-primary);
    color: var(--hp-vp-primary);
    background: var(--hp-vp-primary-light);
}

.hp-vpub-page-btn.active,
.hp-pub-page-btn.active {
    background: var(--hp-vp-primary);
    color: #fff;
    border-color: var(--hp-vp-primary);
    box-shadow: 0 3px 10px rgba(13,59,110,.28);
}

/* ==========================================================================
   ECONOMIC SURVEY TIMELINE  [economic_survey_timeline]
   ========================================================================== */

.hp-es-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0 0 48px;
}

/* Header */
.hp-es-header {
    text-align: center;
    margin-bottom: 44px;
}

.hp-es-main-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--hp-vp-primary);
    letter-spacing: -.02em;
    margin: 0 0 8px;
}

.hp-es-subtitle {
    color: var(--hp-vp-text-muted);
    font-size: 16px;
    margin: 0;
}

/* ── Timeline container ─────────────────────────────────────────────── */
.hp-es-timeline {
    position: relative;
    padding: 10px 0;
}

/* Central vertical line */
.hp-es-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    background: linear-gradient(to bottom,
        var(--hp-vp-accent) 0%,
        var(--hp-vp-primary) 50%,
        var(--hp-vp-accent) 100%);
    border-radius: 2px;
}

/* ── Entry row ──────────────────────────────────────────────────────── */
.hp-es-entry {
    display: grid;
    grid-template-columns: 1fr 72px 1fr;
    margin-bottom: 52px;
    align-items: start;
    position: relative;
}

/* Year side */
.hp-es-year-side {
    padding: 0 26px;
    display: flex;
    align-items: flex-start;
    padding-top: 16px;
}

.hp-es-left .hp-es-year-side { justify-content: flex-end; }
.hp-es-right .hp-es-year-side { justify-content: flex-start; order: 3; }
.hp-es-right .hp-es-node      { order: 2; }
.hp-es-right .hp-es-card-side { order: 1; }

/* Year pill */
.hp-es-year-pill {
    background: linear-gradient(135deg, var(--hp-vp-primary) 0%, #1a5296 100%);
    color: #fff;
    border-radius: 30px;
    padding: 9px 20px;
    font-weight: 800;
    font-size: 14.5px;
    letter-spacing: .02em;
    box-shadow: 0 4px 16px rgba(13,59,110,.26);
    white-space: nowrap;
}

/* Central node */
.hp-es-node {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 14px;
    position: relative;
    z-index: 2;
}

.hp-es-circle {
    width: 42px;
    height: 42px;
    background: var(--hp-vp-surface);
    border: 3px solid var(--hp-vp-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hp-vp-primary);
    box-shadow: 0 0 0 5px rgba(13,59,110,.1);
    transition: var(--hp-vp-transition);
}

.hp-es-entry:hover .hp-es-circle {
    border-color: var(--hp-vp-accent);
    color: var(--hp-vp-accent);
    box-shadow: 0 0 0 6px rgba(200,151,58,.16);
}

/* Card side */
.hp-es-card-side {
    padding: 0 26px;
}

/* ── The Card ────────────────────────────────────────────────────────── */
.hp-es-card {
    background: var(--hp-vp-surface);
    border: 1px solid var(--hp-vp-border);
    border-radius: var(--hp-vp-radius);
    overflow: hidden;
    display: flex;
    box-shadow: var(--hp-vp-shadow);
    transition: var(--hp-vp-transition);
}

.hp-es-entry:hover .hp-es-card {
    box-shadow: var(--hp-vp-shadow-hover);
    border-color: rgba(13,59,110,.16);
    transform: translateY(-3px);
}

/* Card image — prominent portrait */
.hp-es-card-img {
    flex-shrink: 0;
    width: 150px;
    position: relative;
    overflow: hidden;
}

.hp-es-card-img img {
    width: 100%;
    height: 100%;
    min-height: 160px;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.hp-es-entry:hover .hp-es-card-img img {
    transform: scale(1.04);
}

/* Image overlay gradient */
.hp-es-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent 60%, rgba(255,255,255,.08) 100%);
    pointer-events: none;
}

/* Card content */
.hp-es-card-content {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.hp-es-card-year-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--hp-vp-accent);
    background: var(--hp-vp-accent-light);
    border-radius: 20px;
    padding: 3px 10px;
    align-self: flex-start;
}

.hp-es-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--hp-vp-text);
    line-height: 1.35;
}

.hp-es-card-desc {
    margin: 0;
    color: var(--hp-vp-text-muted);
    font-size: 13.5px;
    line-height: 1.65;
    flex: 1;
}

.hp-es-card-desc strong {
    color: var(--hp-vp-primary);
}

/* Download button */
.hp-es-download-btn {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: var(--hp-vp-primary);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    align-self: flex-start;
    transition: var(--hp-vp-transition);
}

.hp-es-download-btn:hover {
    background: var(--hp-vp-accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(200,151,58,.38);
    transform: translateY(-1px);
}

/* ── Responsive: Timeline ───────────────────────────────────────────── */
@media (max-width: 800px) {
    .hp-es-line { left: 20px; }

    .hp-es-entry {
        grid-template-columns: 42px 1fr;
        grid-template-rows: auto auto;
        gap: 0 14px;
        margin-bottom: 32px;
    }

    .hp-es-left .hp-es-node,
    .hp-es-right .hp-es-node {
        order: 1;
        grid-column: 1;
        grid-row: 1;
        padding-top: 0;
        justify-content: flex-start;
    }

    .hp-es-left .hp-es-year-side,
    .hp-es-right .hp-es-year-side {
        order: 2;
        grid-column: 2;
        grid-row: 1;
        justify-content: flex-start;
        padding: 4px 0 0;
    }

    .hp-es-left .hp-es-card-side,
    .hp-es-right .hp-es-card-side {
        order: 3;
        grid-column: 2;
        grid-row: 2;
        padding: 12px 0 0;
    }

    .hp-es-circle { width: 36px; height: 36px; }
    .hp-es-card-img { width: 110px; }
}

@media (max-width: 520px) {
    .hp-es-card { flex-direction: column; }
    .hp-es-card-img { width: 100%; }
    .hp-es-card-img img { height: 200px; min-height: unset; }

    .hp-vpub-filter-row { flex-direction: column; align-items: stretch; }
    .hp-vpub-search-input,
    .hp-vpub-filter-select,
    .hp-vpub-filter-btn,
    .hp-vpub-filter-reset { width: 100%; min-width: unset; }
}


/* Language buttons for Economic Survey */
.hp-vpub-card-footer { flex-wrap: wrap; gap: 6px; }
.hp-vpub-lang-en { background: #1a56db; }
.hp-vpub-lang-hi { background: #e3522a; }
.hp-es-download-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }