/*
Theme Name: Rajpedia
Theme URI: https://example.com/rajpedia
Author: Your Name
Author URI: https://example.com
Description: A clean, lightweight Wikipedia-style knowledge base and exam portal theme for Rajasthan public recruitments built with Bootstrap 3.4.
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: rajpedia
*/

/* ==========================================================================
   1. Reset & Global Portal Styles
   ========================================================================== */
body {
  background-color: #ffffff;
  color: #202122;
  font-family: "Noto Sans Devanagari", sans-serif;
  line-height: 1.65;
}

a {
  color: #3366cc;
  text-decoration: none;
}
a:hover, a:focus {
  color: #2a4b8d;
  text-decoration: underline;
  outline: none !important;
}

/* ==========================================================================
   2. Header & Navigation (Standard & Inner Pages)
   ========================================================================== */
.custom-nav-wrapper {
  background: #ffffff;
  border-bottom: 1px solid #eaecf0;
  padding: 10px 0;
  position: relative;
  z-index: 1000;
}

.nav-bar-flex {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100%;
}

.brand-holder {
  flex-shrink: 0;
}

.mobile-toggle-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
}
.mobile-toggle-btn .bar {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background-color: #202122;
  transition: 0.3s;
}

.main-navigation-holder {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  margin-left: auto !important;
  gap: 20px;
}

.nav-links-wrapper {
  display: flex;
  align-items: center;
}

.rajpedia-nav-menu {
  display: flex !important;
  flex-direction: row;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.rajpedia-nav-menu li {
  margin: 0 2px;
}
.rajpedia-nav-menu li a {
  padding: 8px 12px;
  color: #202122;
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  font-size: 13.5px;
}
.rajpedia-nav-menu li a:hover {
  color: #3366cc;
  background-color: #f8f9fa;
  border-radius: 2px;
}

.drawer-top-header {
  display: none;
}

.right-nav-tools {
  display: flex !important;
  align-items: center !important;
  gap: 15px;
  flex-shrink: 0;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-input {
  border: 1px solid #a2a9b1;
  border-radius: 2px;
  padding: 5px 30px 5px 10px;
  font-size: 13px;
  outline: none;
  width: 200px;
  height: 32px;
}
.search-input:focus {
  border-color: #3366cc;
}
.search-btn {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  background: none;
  border: none;
  padding: 0 8px;
  cursor: pointer;
  color: #54595d;
}

.auth-buttons-wrap {
  display: flex;
  align-items: center;
}
.auth-buttons-wrap a {
  padding: 5px 12px;
  text-decoration: none;
  font-size: 13px;
  border-radius: 2px;
}
.nav-login-btn { 
  color: #3366cc; 
  font-weight: 600; 
}
.nav-register-btn { 
  background: #3366cc; 
  color: #fff !important; 
  margin-left: 6px;
}

.drawer-overlay { 
  display: none; 
}

/* ==========================================================================
   3. Homepage Specific Styles (Central Map, Exam Links, Search & App Box)
   ========================================================================== */
.wiki-header {
  margin-top: 30px;
  margin-bottom: 25px;
}
.wiki-header img {
  max-width: 260px;
  height: auto;
}

/* Central Globe/Map Container */
.central-featured {
  position: relative;
  width: 520px;
  height: 280px;
  margin: 0 auto 30px auto;
}
.central-globe {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 170px;
  height: 170px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.central-globe img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* 10 Circular Positions Around Center Map */
.lang-item {
  position: absolute;
  width: 155px;
  line-height: 1.3;
  z-index: 2;
}
.lang-item a {
  font-weight: bold;
  color: #3366cc;
  font-size: 14px;
  text-decoration: none;
}
.lang-item a:hover {
  text-decoration: underline;
}
.lang-item span {
  display: block;
  color: #54595d;
  font-size: 11px;
}

.lang-top-left      { top: 5px;   left: 30px;  text-align: right; }
.lang-mid-top-left  { top: 55px;  left: 0px;   text-align: right; }
.lang-mid-left      { top: 115px; left: -15px; text-align: right; }
.lang-mid-bot-left  { top: 175px; left: 0px;   text-align: right; }
.lang-bot-left      { top: 230px; left: 40px;  text-align: right; }

.lang-top-right     { top: 5px;   right: 30px;  text-align: left; }
.lang-mid-top-right { top: 55px;  right: 0px;   text-align: left; }
.lang-mid-right     { top: 115px; right: -15px; text-align: left; }
.lang-mid-bot-right { top: 175px; right: 0px;   text-align: left; }
.lang-bot-right     { top: 230px; right: 40px;  text-align: left; }

/* Homepage Main Search Bar */
.search-container {
  max-width: 520px;
  margin: 0 auto 20px auto;
  padding: 0 15px;
}
.search-input-group {
  border: 1px solid #72777d;
  border-radius: 2px;
  display: flex;
  background: #ffffff;
}
.search-input-group .form-control {
  border: none;
  box-shadow: none;
  height: 42px;
  font-size: 14px;
  flex: 1;
}
.search-input-group .lang-dropdown-btn {
  border: none;
  background: transparent;
  box-shadow: none;
  height: 42px;
  color: #54595d;
  font-size: 12px;
  padding: 0 10px;
  border-left: 1px solid #eaecf0;
}
.search-input-group .btn-search {
  border: none;
  background-color: #3366cc;
  color: #ffffff;
  height: 42px;
  width: 48px;
  border-radius: 0;
  font-size: 16px;
}
.search-input-group .btn-search:hover {
  background-color: #2a4b8d;
}

/* Explore All Directory Bar */
.lang-bar {
  position: relative;
  text-align: center;
  margin: 30px 15px;
}
.lang-bar:before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #eaecf0;
  z-index: 1;
}
.lang-bar-btn {
  position: relative;
  z-index: 2;
  background: #ffffff;
  border: 1px solid #3366cc;
  color: #3366cc;
  border-radius: 4px;
  padding: 6px 16px;
  font-weight: 500;
  font-size: 13px;
  white-space: normal;
  max-width: 100%;
}
.lang-bar-btn:hover {
  background: #f8f9fa;
  color: #2a4b8d;
}

/* App Box & Projects Grid */
.app-box {
  background-color: #f8f9fa;
  border: 1px solid #eaecf0;
  padding: 15px;
  border-radius: 4px;
  margin-top: 20px;
  margin-bottom: 25px;
}
.app-box-icon {
  border: 1px solid #c8ccd1;
  line-height: 40px;
  text-align: center;
  margin-right: 12px;
  margin-bottom: 8px;
  background: #ffffff;
  padding: 4px;
  border-radius: 4px;
}
.app-box-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.app-box a.title {
  font-weight: bold;
  color: #3366cc;
  font-size: 14px;
  display: inline-block;
}
.app-box p {
  font-size: 12px;
  color: #54595d;
  margin: 10px 0;
  line-height: 1.4;
}
.app-badges img {
  height: 28px;
  margin-right: 4px;
  margin-bottom: 5px;
}

.other-projects {
  margin-top: 10px;
}
.project-item {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}
.project-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-text {
  line-height: 1.2;
}
.project-text a {
  font-weight: bold;
  font-size: 13.5px;
  color: #3366cc;
  text-decoration: none;
  display: block;
}
.project-text a:hover {
  text-decoration: underline;
}
.project-text span {
  font-size: 12px;
  color: #72777d;
}

/* ==========================================================================
   4. Floating Elements (Infobox & Table of Contents)
   ========================================================================== */
.infobox-table {
  float: right;
  width: 320px;
  border: 1px solid #a2a9b1;
  background-color: #f8f9fa;
  font-size: 12.5px;
  margin: 0 0 20px 25px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.infobox-title {
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  background-color: #eaecf0;
  padding: 8px;
  border-bottom: 1px solid #a2a9b1;
}
.infobox-image {
  text-align: center;
  padding: 12px;
  background: #ffffff;
  border-bottom: 1px solid #eaecf0;
}
.infobox-table th {
  width: 42%;
  padding: 6px 10px;
  vertical-align: top;
  border-top: 1px solid #eaecf0;
  font-weight: 600;
  color: #202122;
}
.infobox-table td {
  padding: 6px 10px;
  vertical-align: top;
  border-top: 1px solid #eaecf0;
}

.toc-card {
  float: left;
  clear: left;
  width: 300px;
  border: 1px solid #a2a9b1;
  background-color: #f8f9fa;
  padding: 12px 18px;
  margin: 10px 25px 15px 0;
  border-radius: 2px;
}
.toc-header {
  font-weight: bold;
  font-size: 13.5px;
  text-align: center;
  margin-bottom: 8px;
  border-bottom: 1px solid #eaecf0;
  padding-bottom: 4px;
}
.toc-card ul {
  list-style-type: none;
  padding-left: 0;
  margin-bottom: 0;
  font-size: 13px;
}
.toc-card ul ul {
  padding-left: 16px;
}

/* ==========================================================================
   5. Article Content & Pure Tables
   ========================================================================== */
.article-content {
  text-align: justify;
  text-justify: inter-word;
  font-size: 14.5px;
  color: #202122;
}
.article-content h1, 
.article-content h2, 
.article-content h3, 
.article-content h4, 
.article-content h5, 
.article-content h6 {
  font-size: 16px !important;
font-weight-bold !important;
}
.article-content h2 {
  font-family: "Noto Sans Devanagari", sans-serif;
  border-bottom: 1px solid #a2a9b1;
  padding-bottom: 4px;
  margin-top: 25px;
  margin-bottom: 12px;
  font-weight: bold;
}

table {
  width: 100%;
  max-width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  border-spacing: 0;
  background-color: #ffffff;
  border: 1px solid #a2a9b1;
  font-size: 13.5px;
  line-height: 1.5;
  color: #202122;
}
table caption {
  font-weight: bold;
  font-size: 14px;
  text-align: left;
  padding: 8px 4px;
  color: #202122;
  caption-side: top;
}
table th, table td {
  padding: 8px 12px;
  vertical-align: middle;
  border: 1px solid #a2a9b1;
  text-align: left;
}
table thead th, table th {
  background-color: #eaecf0;
  color: #202122;
  font-weight: 600;
  text-align: left;
  border-bottom: 2px solid #a2a9b1;
}
table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}
table tbody tr:hover {
  background-color: #f0f4f9;
}
table td[align="right"] {
  text-align: right;
}
table td[align="center"] {
  text-align: center;
}

/* ==========================================================================
   6. Wikipedia Hover Preview Card Tooltip
   ========================================================================== */
#wiki-hover-preview-card {
  position: absolute !important;
  width: 300px;
  background: #ffffff;
  border: 1px solid #a2a9b1;
  border-radius: 3px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 9999999;
  display: none;
  font-family: "Noto Sans Devanagari", sans-serif;
  pointer-events: auto;
}
#wiki-hover-preview-card::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 20px;
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-left: 1px solid #a2a9b1;
  border-top: 1px solid #a2a9b1;
  transform: rotate(45deg);
}
.wiki-preview-img-box {
  width: 100%;
  height: 120px;
  background-color: #eaecf0;
  overflow: hidden;
  border-bottom: 1px solid #eaecf0;
}
.wiki-preview-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wiki-preview-body {
  padding: 12px 14px;
}
.wiki-preview-title {
  font-family: "Noto Sans Devanagari", sans-serif;
  font-size: 15px;
  font-weight: bold;
  color: #202122;
  margin: 0 0 6px 0;
  line-height: 1.3;
}
.wiki-preview-text {
  font-size: 12px;
  color: #54595d;
  line-height: 1.5;
  margin-bottom: 0;
}

/* ==========================================================================
   7. Footer
   ========================================================================== */
.wiki-footer {
  background-color: #f8f9fa;
  border-top: 1px solid #eaecf0;
  padding: 30px 0 20px 0;
  font-size: 12.5px;
  color: #54595d;
  margin-top: 40px;
}

/* ==========================================================================
   8. Responsive & Mobile Drawer Breakpoints (< 768px)
   ========================================================================== */
@media (max-width: 767px) {
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 15px 0;
  }
  table th, table td {
    white-space: nowrap;
    padding: 6px 8px;
    font-size: 12.5px;
  }

  /* Homepage Mobile Stacking */
  .wiki-header {
    margin-top: 20px;
    margin-bottom: 15px;
  }
  .wiki-header img {
    max-width: 200px;
  }
  .central-featured {
    width: 100%;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 20px;
  }
  .central-globe {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    height: 130px;
    margin-bottom: 15px;
  }
  .central-globe img {
    max-height: 120px;
  }
  .lang-item {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 48%;
    text-align: left !important;
    margin-bottom: 12px;
    padding: 8px 10px;
    background: #f8f9fa;
    border: 1px solid #eaecf0;
    border-radius: 4px;
    max-width: none !important;
  }
  .lang-item a {
    font-size: 13px;
  }
  .lang-item span {
    font-size: 11px;
  }
  .search-container {
    padding: 0 5px;
  }
  .app-box {
    margin-top: 10px;
  }
  .project-item {
    margin-bottom: 16px;
  }

  .infobox-table, .toc-card {
    float: none;
    width: 100%;
    margin: 10px 0 20px 0;
  }

  /* Mobile Drawer Toggle & Overlay */
  .nav-bar-flex {
    justify-content: space-between !important;
  }
  .mobile-toggle-btn {
    display: block;
  }
  .drawer-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  .drawer-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Slide Drawer Container */
  .main-navigation-holder {
    position: fixed !important;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    z-index: 9999;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    padding: 20px;
    margin-left: 0 !important;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    transition: left 0.3s ease-in-out;
  }
  .main-navigation-holder.active {
    left: 0 !important;
  }

  .drawer-top-header {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #eaecf0;
    margin-bottom: 15px;
  }
  .drawer-title {
    font-size: 16px;
    font-weight: 700;
  }
  .drawer-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
  }

  .nav-links-wrapper {
    width: 100%;
  }
  .rajpedia-nav-menu {
    flex-direction: column !important;
    width: 100% !important;
    align-items: flex-start !important;
  }
  .rajpedia-nav-menu li {
    width: 100%;
    border-bottom: 1px solid #f0f0f0;
  }
  .rajpedia-nav-menu li a {
    display: block;
    padding: 10px 5px;
  }
  
  .right-nav-tools {
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100%;
    margin-top: 20px;
  }
  .search-input-wrap, .search-input {
    width: 100% !important;
  }
  .auth-buttons-wrap {
    margin-top: 10px;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .central-featured {
    width: 100%;
    transform: scale(0.92);
  }
}