/*
Theme Name: PrepUpdate
Theme URI: https://prepupdate.in
Author: PrepUpdate Team
Author URI: https://prepupdate.in
Description: PrepUpdate - Government Jobs, Results, Admit Card & Current Affairs Portal. Professional theme mixing news portal and exam update styles.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: prepupdate
Tags: news, education, government-jobs, custom-colors, custom-menu, featured-images, sticky-post, threaded-comments, translation-ready
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:    #c0392b;
  --primary-dk: #96281b;
  --accent:     #f39c12;
  --navy:       #1a2744;
  --navy-lt:    #253461;
  --bg:         #f5f5f5;
  --white:      #ffffff;
  --text:       #222222;
  --text-lt:    #555555;
  --border:     #dddddd;
  --tag-green:  #27ae60;
  --tag-blue:   #2980b9;
  --tag-orange: #e67e22;
  --tag-red:    #c0392b;
  --radius:     4px;
  --shadow:     0 2px 8px rgba(0,0,0,.10);
}

body {
  font-family: 'Noto Sans', 'Hind', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dk); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ===== TOP BAR ===== */
#topbar {
  background: var(--navy);
  color: #ccc;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 2px solid var(--primary);
}
#topbar .tb-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
#topbar .tb-left span { margin-right: 14px; color: #aaa; }
#topbar .tb-left span strong { color: var(--accent); }
#topbar .tb-right a {
  color: #ccc;
  margin-left: 10px;
  font-size: 12px;
}
#topbar .tb-right a:hover { color: var(--accent); text-decoration: none; }

/* ===== HEADER ===== */
#site-header {
  background: var(--primary);
  padding: 10px 0;
  box-shadow: 0 3px 8px rgba(0,0,0,.25);
}
#site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
#site-logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-icon {
  background: var(--white);
  color: var(--primary);
  font-size: 28px;
  font-weight: 900;
  width: 50px;
  height: 50px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -1px;
}
.logo-text { color: var(--white); }
.logo-text .site-name {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.logo-text .site-tagline {
  font-size: 11px;
  opacity: .85;
  letter-spacing: .5px;
}

/* Header Ad / Banner area */
.header-ad {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius);
  padding: 8px 16px;
  color: var(--white);
  font-size: 12px;
  text-align: center;
}

/* ===== NAVIGATION ===== */
#main-nav {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
#main-nav .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#main-nav ul.nav-menu {
  display: flex;
  flex-wrap: wrap;
}
#main-nav ul.nav-menu > li > a {
  display: block;
  color: var(--white);
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  border-right: 1px solid rgba(255,255,255,.08);
  transition: background .2s;
}
#main-nav ul.nav-menu > li > a:hover,
#main-nav ul.nav-menu > li.current-menu-item > a {
  background: var(--primary);
  text-decoration: none;
}
/* Dropdown */
#main-nav ul.nav-menu li { position: relative; }
#main-nav ul.nav-menu li ul.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--navy-lt);
  min-width: 200px;
  border-top: 2px solid var(--primary);
  z-index: 100;
  box-shadow: var(--shadow);
}
#main-nav ul.nav-menu li:hover ul.sub-menu { display: block; }
#main-nav ul.nav-menu li ul.sub-menu li a {
  display: block;
  color: #ddd;
  padding: 9px 16px;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
#main-nav ul.nav-menu li ul.sub-menu li a:hover {
  background: var(--primary);
  color: var(--white);
  text-decoration: none;
}
.nav-search input {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: var(--white);
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 3px;
  width: 180px;
}
.nav-search input::placeholder { color: rgba(255,255,255,.5); }

/* ===== TICKER ===== */
#news-ticker {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 7px 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.ticker-label {
  background: var(--primary);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: .5px;
}
.ticker-wrap {
  flex: 1;
  overflow: hidden;
  padding-left: 14px;
}
.ticker-items {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
}
.ticker-items a { font-size: 12px; color: var(--navy); }
.ticker-items a:hover { color: var(--primary); }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 12px; }
.site-body { padding: 14px 0; }
.content-row {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 14px;
}

/* ===== SECTION HEADING ===== */
.section-heading {
  background: var(--navy);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  text-transform: uppercase;
  letter-spacing: .6px;
  border-left: 4px solid var(--primary);
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-heading .view-all {
  font-size: 11px;
  color: var(--accent);
  font-weight: 400;
  text-transform: none;
}
.section-heading .view-all:hover { color: var(--white); text-decoration: none; }

/* ===== POST CARD (grid) ===== */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 10px;
}
.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s;
}
.post-card:hover { box-shadow: var(--shadow); }
.post-card .card-thumb { height: 120px; overflow: hidden; }
.post-card .card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.post-card:hover .card-thumb img { transform: scale(1.04); }
.post-card .card-body { padding: 8px; }
.post-card .card-cat {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-weight: 600;
}
.post-card .card-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 4px;
}
.post-card .card-title a { color: inherit; }
.post-card .card-title a:hover { color: var(--primary); text-decoration: none; }
.post-card .card-meta { font-size: 10px; color: var(--text-lt); }

/* ===== LIST BOX (Sarkari Result style) ===== */
.list-box {
  background: var(--white);
  border: 1px solid var(--border);
}
.list-box .list-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px dashed var(--border);
  font-size: 12.5px;
  transition: background .15s;
}
.list-box .list-item:last-child { border-bottom: none; }
.list-box .list-item:hover { background: #fef9f0; }
.list-box .list-item::before {
  content: '▶';
  color: var(--primary);
  font-size: 9px;
  flex-shrink: 0;
  margin-top: 3px;
}
.list-box .list-item a { color: var(--text); flex: 1; }
.list-box .list-item a:hover { color: var(--primary); text-decoration: none; }
.badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 2px;
  flex-shrink: 0;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-new    { background: var(--tag-red);    color: #fff; }
.badge-hot    { background: var(--accent);     color: #fff; }
.badge-result { background: var(--tag-green);  color: #fff; }
.badge-admit  { background: var(--tag-blue);   color: #fff; }
.badge-answer { background: var(--tag-orange); color: #fff; }

/* ===== IMPORTANT LINKS TABLE ===== */
.links-table-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 10px;
}
.links-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.links-table th {
  background: var(--navy);
  color: var(--white);
  padding: 7px 10px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
}
.links-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.links-table tr:nth-child(even) td { background: #f9f9f9; }
.links-table tr:hover td { background: #fff7f0; }
.links-table td a {
  color: var(--primary);
  font-weight: 600;
}
.btn-link {
  display: inline-block;
  background: var(--primary);
  color: var(--white) !important;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  margin: 2px;
}
.btn-link:hover { background: var(--primary-dk); text-decoration: none !important; }
.btn-link.green { background: var(--tag-green); }
.btn-link.blue  { background: var(--tag-blue);  }

/* ===== CATEGORY TABS ===== */
.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 10px;
}
.cat-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: var(--white);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  min-width: 90px;
  transition: background .2s;
  cursor: pointer;
  text-decoration: none;
}
.cat-tab .tab-icon { font-size: 20px; margin-bottom: 3px; }
.cat-tab:hover { background: var(--primary); text-decoration: none; color: var(--white); }
.cat-tab.active { background: var(--primary); }

/* ===== SIDEBAR ===== */
.sidebar .widget {
  background: var(--white);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.sidebar .widget-title {
  background: var(--navy);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-left: 4px solid var(--primary);
}
.sidebar .widget-body { padding: 8px 0; }
.sidebar .widget-body .list-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 6px 12px;
  border-bottom: 1px dashed var(--border);
  font-size: 12px;
}
.sidebar .widget-body .list-item:last-child { border-bottom: none; }
.sidebar .widget-body .list-item::before {
  content: '▸';
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.sidebar .widget-body .list-item a { color: var(--text); }
.sidebar .widget-body .list-item a:hover { color: var(--primary); text-decoration: none; }

/* Sidebar quick links */
.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); }
.quick-links a {
  background: var(--white);
  color: var(--navy);
  font-size: 11px;
  font-weight: 600;
  padding: 9px 8px;
  text-align: center;
  display: block;
  transition: background .2s;
}
.quick-links a:hover { background: var(--primary); color: var(--white); text-decoration: none; }

/* ===== AD BOXES ===== */
.ad-box {
  background: #fff8e1;
  border: 2px dashed var(--accent);
  text-align: center;
  padding: 16px;
  font-size: 12px;
  color: var(--text-lt);
  margin-bottom: 14px;
}
.ad-box strong { display: block; color: var(--accent); font-size: 13px; }

/* ===== EXAM CALENDAR ===== */
.exam-calendar { width: 100%; border-collapse: collapse; font-size: 11px; }
.exam-calendar th {
  background: var(--primary);
  color: var(--white);
  padding: 6px 8px;
  text-align: left;
}
.exam-calendar td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}
.exam-calendar tr:nth-child(even) td { background: #f9f9f9; }
.exam-calendar .date-cell { font-weight: 700; color: var(--primary); }

/* ===== POSTS PAGE ===== */
.page-title-bar {
  background: var(--navy);
  color: var(--white);
  padding: 12px 0;
  margin-bottom: 14px;
}
.page-title-bar h1 { font-size: 20px; font-weight: 700; }
.page-title-bar .breadcrumb { font-size: 11px; color: #aaa; margin-top: 3px; }
.page-title-bar .breadcrumb a { color: var(--accent); }

/* Single post */
.single-post { background: var(--white); border: 1px solid var(--border); padding: 20px; }
.single-post h1 { font-size: 22px; font-weight: 800; color: var(--navy); margin-bottom: 10px; line-height: 1.3; }
.post-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  color: var(--text-lt);
  padding: 8px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.post-meta-bar span strong { color: var(--primary); }
.post-content { font-size: 14px; line-height: 1.8; }
.post-content h2 { font-size: 18px; color: var(--navy); margin: 18px 0 8px; border-left: 4px solid var(--primary); padding-left: 10px; }
.post-content h3 { font-size: 15px; color: var(--navy); margin: 14px 0 6px; }
.post-content p { margin-bottom: 12px; }
.post-content ul { list-style: disc; padding-left: 22px; margin-bottom: 12px; }
.post-content table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 14px; }
.post-content table th { background: var(--navy); color: var(--white); padding: 8px 10px; }
.post-content table td { padding: 7px 10px; border: 1px solid var(--border); }
.post-content table tr:nth-child(even) td { background: #f9f9f9; }

/* ===== FOOTER ===== */
#site-footer {
  background: var(--navy);
  color: #ccc;
  padding: 30px 0 0;
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-col h4 {
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary);
}
.footer-col ul li a {
  color: #aaa;
  font-size: 12px;
  display: block;
  padding: 3px 0;
}
.footer-col ul li a:hover { color: var(--accent); text-decoration: none; }
.footer-col p { font-size: 12px; color: #999; line-height: 1.7; }
.footer-bottom {
  background: rgba(0,0,0,.3);
  text-align: center;
  padding: 12px 0;
  font-size: 11px;
  color: #888;
}
.footer-bottom a { color: var(--accent); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .content-row { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-tabs { justify-content: center; }
}
@media (max-width: 600px) {
  .post-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  #main-nav ul.nav-menu > li > a { padding: 10px 9px; font-size: 11px; }
  .logo-text .site-name { font-size: 20px; }
  .nav-search { display: none; }
  .header-ad { display: none; }
}

/* ===== MOBILE HAMBURGER ===== */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  color: var(--white);
  font-size: 22px;
}
@media (max-width: 768px) {
  .hamburger { display: block; }
  #main-nav .nav-inner { position: relative; }
  #main-nav ul.nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    z-index: 999;
  }
  #main-nav ul.nav-menu.open { display: flex; }
  #main-nav ul.nav-menu > li > a { border-right: none; border-bottom: 1px solid rgba(255,255,255,.08); }
}

/* ===== UTILITIES ===== */
.mt-1 { margin-top: 14px; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.highlight-row { background: #fff3cd; }

/* ===== SCROLL TO TOP ===== */
#scrollTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary);
  color: var(--white);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  transition: opacity .3s;
  box-shadow: var(--shadow);
  border: none;
}
#scrollTop.visible { opacity: 1; }

/* ===== SEARCH DROPDOWN ===== */
.nav-search { position: relative; }
#search-results-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border);
    min-width: 320px;
    max-height: 380px;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.sr-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 12px;
    text-decoration: none;
    transition: background .15s;
}
.sr-item:hover { background: #fef9f0; text-decoration: none; }
.sr-title { flex: 1; }
