/* ═══════════════════════════════════════════════════════
   JanSewa Homepage — Complete Stylesheet
   Design: High-density information layout matching
   professional sarkari job portals. Red/orange primary,
   clean whites, Noto Sans Devanagari for Hindi.
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;500;600;700&family=Tiro+Devanagari+Hindi&family=Mukta:wght@400;500;600;700;800&display=swap');

:root {
    --jhp-red:      #c0392b;
    --jhp-red-dark: #a93226;
    --jhp-orange:   #e67e22;
    --jhp-dark:     #2c3e50;
    --jhp-darker:   #1a252f;
    --jhp-green:    #27ae60;
    --jhp-blue:     #2980b9;
    --jhp-purple:   #6a1b9a;
    --jhp-gray:     #7f8c8d;
    --jhp-light:    #f8f9fa;
    --jhp-white:    #ffffff;
    --jhp-border:   #dee2e6;
    --jhp-text:     #2c3e50;
    --jhp-hindi:    'Noto Sans Devanagari', 'Tiro Devanagari Hindi', sans-serif;
    --jhp-font:     'Mukta', -apple-system, sans-serif;
    --jhp-radius:   6px;
    --jhp-shadow:   0 2px 8px rgba(0,0,0,0.08);
}

/* ── Reset ── */
.jhp-wrap, .jhp-wrap * { box-sizing: border-box; }
.jhp-wrap {
    font-family: var(--jhp-font);
    color: var(--jhp-text);
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
    line-height: 1.5;
}

/* ══════════════════════════════════════════════
   SEARCH BAR
   ══════════════════════════════════════════════ */
.jhp-search-wrap {
    background: var(--jhp-dark);
    padding: 12px 16px;
}
.jhp-search-form { width: 100%; }
.jhp-search-inner {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    max-width: 700px;
    margin: 0 auto;
}
.jhp-search-icon { padding: 0 12px; font-size: 16px; color: var(--jhp-gray); flex-shrink: 0; }
.jhp-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 11px 8px;
    font-size: 14px;
    font-family: var(--jhp-hindi), var(--jhp-font);
    background: transparent;
    color: var(--jhp-text);
    min-width: 0;
}
.jhp-search-input::placeholder { color: #aaa; }
.jhp-search-btn {
    background: var(--jhp-red);
    color: white;
    border: none;
    padding: 11px 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--jhp-font);
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s;
}
.jhp-search-btn:hover { background: var(--jhp-red-dark); }

/* ══════════════════════════════════════════════
   QUICK TILES
   ══════════════════════════════════════════════ */
.jhp-tiles-wrap {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    background: var(--jhp-darker);
    border-bottom: 3px solid var(--jhp-red);
}
.jhp-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    text-decoration: none;
    color: white;
    transition: background 0.15s;
    border-right: 1px solid rgba(255,255,255,0.08);
    gap: 3px;
}
.jhp-tile:last-child { border-right: none; }
.jhp-tile:hover { background: var(--tile-color); text-decoration: none; }
.jhp-tile-icon { font-size: 22px; }
.jhp-tile-eng  { font-size: 11px; font-weight: 700; text-align: center; }
.jhp-tile-hin  { font-family: var(--jhp-hindi); font-size: 10px; opacity: 0.8; text-align: center; }

/* ══════════════════════════════════════════════
   LIVE TICKER
   ══════════════════════════════════════════════ */
.jhp-ticker-wrap {
    display: flex;
    align-items: center;
    background: #fff9f0;
    border-top: 2px solid var(--jhp-orange);
    border-bottom: 1px solid #fde8c8;
    overflow: hidden;
    height: 36px;
}
.jhp-ticker-label {
    background: var(--jhp-red);
    color: white;
    font-size: 11px;
    font-weight: 800;
    padding: 0 12px;
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 1px;
}
.jhp-ticker-track {
    flex: 1;
    overflow: hidden;
    height: 100%;
    position: relative;
}
.jhp-ticker-inner {
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    animation: jhp-ticker 40s linear infinite;
    will-change: transform;
}
.jhp-ticker-inner:hover { animation-play-state: paused; }
.jhp-ticker-item {
    padding: 0 28px;
    font-size: 13px;
    font-weight: 500;
    border-right: 1px solid #fde8c8;
    display: inline-flex;
    align-items: center;
    height: 100%;
}
.jhp-ticker-item a { color: var(--jhp-text); text-decoration: none; }
.jhp-ticker-item a:hover { color: var(--jhp-red); }

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

/* ══════════════════════════════════════════════
   URGENT ALERTS
   ══════════════════════════════════════════════ */
.jhp-urgent-wrap {
    display: flex;
    align-items: stretch;
    background: #fff3cd;
    border-top: 2px solid var(--jhp-orange);
    border-bottom: 1px solid #ffc107;
    flex-wrap: wrap;
    gap: 0;
}
.jhp-urgent-label {
    background: var(--jhp-orange);
    color: white;
    font-size: 11px;
    font-weight: 800;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}
.jhp-urgent-items { display: flex; flex-wrap: wrap; gap: 0; flex: 1; }
.jhp-urgent-item {
    display: flex;
    flex-direction: column;
    padding: 6px 14px;
    text-decoration: none;
    border-right: 1px solid #ffc107;
    transition: background 0.15s;
}
.jhp-urgent-item:hover { background: #fff8dc; text-decoration: none; }
.jhp-urgent-item strong { font-size: 12px; color: var(--jhp-text); font-weight: 700; }
.jhp-urgent-item span   { font-size: 11px; color: var(--jhp-red); font-weight: 600; }
.jhp-urgent-critical strong { color: #c0392b; }

/* ══════════════════════════════════════════════
   SOCIAL LINKS
   ══════════════════════════════════════════════ */
.jhp-social-wrap {
    background: #1a252f;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.jhp-social-label {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}
.jhp-social-links { display: flex; gap: 8px; flex-wrap: wrap; }
.jhp-social-btn {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.15s;
}
.jhp-social-btn:hover { opacity: 0.85; text-decoration: none; }
.jhp-social-wa { background: #25d366; color: white; }
.jhp-social-tg { background: #0088cc; color: white; }
.jhp-social-yt { background: #ff0000; color: white; }

/* ══════════════════════════════════════════════
   AD SPACES
   ══════════════════════════════════════════════ */
.jhp-adspace {
    margin: 12px 0;
    text-align: center;
    width: 100%;
    overflow: hidden;
}
/* Placeholder shown only before AdSense is added */
.jhp-adspace .jhp-ad-placeholder {
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 4px;
    padding: 20px;
    color: #adb5bd;
    font-size: 12px;
    letter-spacing: 1px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Once AdSense ins tag is added, placeholder hides automatically */
.jhp-adspace ins { display: block; }

/* ══════════════════════════════════════════════
   MAIN GRID
   ══════════════════════════════════════════════ */
.jhp-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 10px 0;
}

/* ══════════════════════════════════════════════
   SECTION BLOCKS
   ══════════════════════════════════════════════ */
.jhp-section {
    background: var(--sec-bg, #ffffff);
    border: 1px solid var(--jhp-border);
    border-top: 3px solid var(--sec-color, #c0392b);
    border-radius: var(--jhp-radius);
    overflow: hidden;
}
.jhp-sec-header {
    background: var(--sec-color, #c0392b);
    color: white;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.jhp-sec-title {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}
.jhp-sec-icon { font-size: 16px; flex-shrink: 0; }
.jhp-sec-eng  { font-size: 14px; font-weight: 800; }
.jhp-sec-hin  { font-family: var(--jhp-hindi); font-size: 11px; opacity: 0.88; }
.jhp-view-all {
    color: rgba(255,255,255,0.9);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    background: rgba(255,255,255,0.15);
    padding: 3px 8px;
    border-radius: 3px;
    flex-shrink: 0;
    transition: background 0.15s;
}
.jhp-view-all:hover { background: rgba(255,255,255,0.3); color: white; text-decoration: none; }

/* Post List */
.jhp-post-list { padding: 4px 0; }
.jhp-post-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 7px 10px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background 0.12s;
}
.jhp-post-item:last-child { border-bottom: none; }
.jhp-post-item:hover { background: rgba(0,0,0,0.03); }
.jhp-post-arrow {
    color: var(--sec-color, #c0392b);
    font-size: 16px;
    font-weight: 900;
    flex-shrink: 0;
    margin-top: 1px;
    line-height: 1.3;
}
.jhp-post-info { flex: 1; min-width: 0; }
.jhp-post-title {
    display: block;
    color: var(--jhp-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    word-break: break-word;
    font-family: var(--jhp-hindi), var(--jhp-font);
}
.jhp-post-title:hover { color: var(--sec-color); text-decoration: underline; }
.jhp-post-meta { margin-top: 3px; }

/* NEW badge */
.jhp-new-badge {
    display: inline-block;
    background: #e74c3c;
    color: white;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 4px;
    vertical-align: middle;
    animation: jhp-pulse 2s infinite;
    letter-spacing: 0.5px;
}

/* Date badges */
.jhp-date-badge {
    font-size: 11px;
    font-weight: 600;
    font-family: var(--jhp-font);
    display: inline-block;
}
.jhp-date-pub    { color: var(--jhp-gray); }
.jhp-date-past   { color: var(--jhp-gray); text-decoration: line-through; }
.jhp-date-future { color: #27ae60; }
.jhp-date-urgent { color: var(--jhp-orange); font-weight: 700; }
.jhp-date-today  { color: var(--jhp-red); font-weight: 700; animation: jhp-pulse 1s infinite; }
.jhp-date-na     { color: #ccc; }

.jhp-no-posts { padding: 20px; text-align: center; color: var(--jhp-gray); font-size: 13px; }

/* ══════════════════════════════════════════════
   FAQ SECTION
   ══════════════════════════════════════════════ */
.jhp-faq-wrap {
    background: var(--jhp-white);
    border: 1px solid var(--jhp-border);
    border-top: 3px solid var(--jhp-dark);
    border-radius: var(--jhp-radius);
    margin: 10px 0;
    overflow: hidden;
}
.jhp-faq-title {
    background: var(--jhp-dark);
    color: white;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.jhp-faq-hin { font-family: var(--jhp-hindi); font-size: 13px; font-weight: 400; opacity: 0.85; }
.jhp-faq-list { padding: 0; }
.jhp-faq-item { border-bottom: 1px solid var(--jhp-border); }
.jhp-faq-item:last-child { border-bottom: none; }
.jhp-faq-q {
    width: 100%;
    background: none;
    border: none;
    padding: 13px 16px;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: var(--jhp-text);
    font-family: var(--jhp-hindi), var(--jhp-font);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    transition: background 0.15s;
}
.jhp-faq-q:hover { background: #f8f9fa; }
.jhp-faq-q[aria-expanded="true"] { background: #fdf2f0; color: var(--jhp-red); }
.jhp-faq-hin-q {
    display: block;
    font-family: var(--jhp-hindi);
    font-size: 12px;
    font-weight: 500;
    color: var(--jhp-gray);
    margin-top: 3px;
}
.jhp-faq-q[aria-expanded="true"] .jhp-faq-hin-q { color: var(--jhp-red); opacity: 0.7; }
.jhp-faq-arrow {
    font-size: 20px;
    font-weight: 400;
    flex-shrink: 0;
    color: var(--jhp-red);
    transition: transform 0.2s;
}
.jhp-faq-q[aria-expanded="true"] .jhp-faq-arrow { transform: rotate(45deg); }
.jhp-faq-a {
    display: none;
    padding: 0 16px 14px 16px;
    font-size: 13px;
    color: #555;
    line-height: 1.7;
    background: #fdf9f9;
    font-family: var(--jhp-hindi), var(--jhp-font);
}
.jhp-faq-a.open { display: block; }
.jhp-faq-a p { margin: 0; }

/* ══════════════════════════════════════════════
   ABOUT STRIP
   ══════════════════════════════════════════════ */
.jhp-about-strip {
    background: var(--jhp-light);
    border: 1px solid var(--jhp-border);
    border-radius: var(--jhp-radius);
    padding: 14px 18px;
    font-size: 13px;
    color: var(--jhp-text);
    line-height: 1.7;
    margin: 10px 0;
}
.jhp-about-hin {
    display: block;
    font-family: var(--jhp-hindi);
    font-size: 13px;
    color: var(--jhp-gray);
    margin-top: 6px;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 900px) {
    .jhp-grid-3 { grid-template-columns: 1fr 1fr; }
    .jhp-tiles-wrap { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
    .jhp-grid-3 { grid-template-columns: 1fr; }
    .jhp-tiles-wrap { grid-template-columns: repeat(3, 1fr); }
    .jhp-stats-bar { grid-template-columns: repeat(2, 1fr); }
    .jhp-h1 { font-size: 18px; }
    .jhp-search-btn { padding: 11px 12px; font-size: 12px; }
    .jhp-sec-hin { display: none; }
}

@media (max-width: 380px) {
    .jhp-tiles-wrap { grid-template-columns: repeat(2, 1fr); }
    .jhp-stats-bar  { grid-template-columns: repeat(2, 1fr); }
}
