/*
Theme Name: Josh Studies
Theme URI: https://joshstudies.com/
Author: Josh Studies
Author URI: https://joshstudies.com/
Description: Official Josh Studies theme — Sarkari Jobs, Results, Admit Cards, Syllabus & Current Affairs portal. Navy & orange branded layout with category grid cards.
Version: 1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: josh-studies
*/

:root{
  --navy:#122156;
  --navy-deep:#0b1738;
  --orange:#f47c20;
  --orange-deep:#d9660f;
  --paper:#f6f7fb;
  --card:#ffffff;
  --line:#dfe4f0;
  --ink:#1c2333;
  --ink-soft:#5b6478;
  --green:#1fa855;
}
*{box-sizing:border-box;}
html{scroll-padding-top:0;}
body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:'Manrope',system-ui,-apple-system,sans-serif;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none;}
img{max-width:100%;height:auto;display:block;}
ul{list-style:none;margin:0;padding:0;}

/* ===== Top identity bar ===== */
.topbar{
  background:var(--navy-deep);
  color:#c9d2ec;
  font-size:12.5px;
  padding:6px 20px;
  display:flex;
  justify-content:space-between;
  letter-spacing:.2px;
  overflow-x:auto;
  white-space:nowrap;
}
.topbar span{opacity:.85;}

/* ===== Header ===== */
header.masthead{
  background:linear-gradient(135deg,var(--navy) 0%,#1a2f70 100%);
  padding:26px 20px 30px;
  text-align:center;
}
.brand{display:inline-flex;align-items:center;gap:14px;justify-content:center;}
.brand img{height:56px;width:auto;filter:drop-shadow(0 2px 6px rgba(0,0,0,.25));}
.brand-text{text-align:left;}
.brand-text .name{
  font-family:Georgia,'Merriweather',serif;
  font-weight:900;
  font-size:30px;
  color:#fff;
  line-height:1;
}
.brand-text .tm{font-size:14px;vertical-align:super;opacity:.7;}
.tagline{
  margin-top:12px;
  color:#cfd8f5;
  font-size:14.5px;
  max-width:640px;
  margin-left:auto;
  margin-right:auto;
  line-height:1.5;
}
.tagline b{color:#fff;}

/* ===== Nav ===== */
nav.mainnav{background:var(--navy-deep);border-top:1px solid rgba(255,255,255,.08);}
.nav-inner{
  max-width:1180px;
  margin:0 auto;
  display:flex;
  align-items:center;
  overflow-x:auto;
  scrollbar-width:none;
}
.nav-inner::-webkit-scrollbar{display:none;}
.nav-inner ul{display:flex;align-items:center;}
.nav-inner a{
  color:#dbe2f6;
  padding:13px 18px;
  font-size:13.5px;
  font-weight:600;
  white-space:nowrap;
  display:block;
  border-bottom:3px solid transparent;
  transition:border-color .15s ease, color .15s ease;
}
.nav-inner a:hover{color:#fff;border-color:var(--orange);}
.nav-inner .current-affairs > a{color:var(--orange);}
.nav-search{margin-left:auto;padding:0 16px;color:#dbe2f6;flex:none;}

/* ===== Live + CTA strip ===== */
.strip{background:#fff;border-bottom:1px solid var(--line);padding:16px 20px 10px;text-align:center;}
.live-pill{
  display:inline-flex;align-items:center;gap:6px;
  background:#fdeceb;color:#c0271c;font-size:12px;font-weight:700;
  padding:5px 12px;border-radius:20px;letter-spacing:.3px;
}
.live-dot{width:7px;height:7px;background:#e0231a;border-radius:50%;animation:pulse 1.4s infinite;}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.3}}
.whatsapp-btn{
  display:inline-block;margin-top:14px;background:var(--green);color:#fff;
  font-weight:700;font-size:14px;padding:11px 26px;border-radius:8px;
  box-shadow:0 4px 12px rgba(31,168,85,.28);
}

/* ===== Trending quick-links ===== */
.trending{max-width:1180px;margin:22px auto 0;padding:0 20px;display:grid;grid-template-columns:repeat(4,1fr);gap:12px;}
.trending a{padding:13px 16px;border-radius:8px;font-size:13.5px;font-weight:700;color:#fff;line-height:1.35;}
.trending a small{display:block;font-weight:600;font-size:11.5px;opacity:.85;margin-top:2px;}
.t1{background:#c0271c;}
.t2{background:var(--orange);}
.t3{background:#a3238e;}
.t4{background:#1a2f70;}

/* ===== Main grid ===== */
main{max-width:1180px;margin:0 auto;padding:26px 20px 40px;}
.section-heading{
  font-family:Georgia,'Merriweather',serif;font-weight:900;font-size:22px;
  color:var(--navy);margin:36px 0 16px;
}
.section-heading:first-child{margin-top:0;}
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;}
.card{background:var(--card);border:1px solid var(--line);border-radius:10px;overflow:hidden;display:flex;flex-direction:column;}
.card-head{
  background:var(--navy);color:#fff;font-weight:700;font-size:14.5px;
  padding:12px 16px;display:flex;align-items:center;gap:8px;
}
.card-head .dot{width:6px;height:6px;background:var(--orange);border-radius:50%;flex:none;}
.card ul{padding:6px 0;flex:1;}
.card li{border-bottom:1px solid #edf0f7;}
.card li:last-child{border-bottom:none;}
.card li a{display:block;padding:10px 16px;font-size:13.5px;color:#26314f;line-height:1.4;}
.card li a:hover{color:var(--orange-deep);background:#fbf6f0;}
.card li a .count{color:var(--ink-soft);font-weight:600;}
.card-foot{padding:12px 16px 16px;}
.view-more{
  display:block;text-align:center;background:var(--orange);color:#fff;
  font-weight:700;font-size:13px;padding:9px 0;border-radius:6px;transition:background .15s ease;
}
.view-more:hover{background:var(--orange-deep);}
.card.ca .card-head{background:linear-gradient(120deg,var(--navy) 60%,#233a86 100%);}
.card.ca .card-head .dot{background:#ffd166;}
.card .empty{padding:16px;font-size:13px;color:var(--ink-soft);}

/* ===== Single post / page ===== */
.single-wrap{max-width:820px;margin:0 auto;padding:30px 20px 50px;}
.single-wrap h1{font-family:Georgia,'Merriweather',serif;color:var(--navy);font-size:26px;line-height:1.3;}
.post-meta{color:var(--ink-soft);font-size:13px;margin-bottom:20px;}
.post-content{font-size:15px;line-height:1.75;}
.post-content img{border-radius:8px;margin:16px 0;}

/* ===== Featured thumbnail (responsive, ratio-locked, no distortion) ===== */
.featured-thumb{
  width:100%;
  aspect-ratio:16/9;
  overflow:hidden;
  border-radius:10px;
  margin:4px 0 22px;
  background:#eef1f8;
}
.featured-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  display:block;
  margin:0;
  border-radius:0;
}
@media (max-width:560px){
  .featured-thumb{aspect-ratio:4/3;border-radius:8px;}
}

/* ===== Auto Table of Contents ===== */
.toc-box{
  background:#fff;
  border:1px solid var(--line);
  border-left:4px solid var(--orange);
  border-radius:8px;
  padding:16px 20px;
  margin:6px 0 24px;
}
.toc-title{
  font-weight:800;
  font-size:14px;
  color:var(--navy);
  margin-bottom:8px;
}
.toc-box ul{margin:0;padding:0;}
.toc-box li{list-style:none;padding:4px 0;border:none;}
.toc-box li a{
  font-size:13.5px;
  color:#2a3556;
  font-weight:600;
}
.toc-box li a:hover{color:var(--orange-deep);text-decoration:underline;}
.toc-box li.toc-sub{padding-left:16px;}
.toc-box li.toc-sub a{font-weight:500;color:var(--ink-soft);}

/* ===== Important Links / Dates table (used by [imp_table]) ===== */
.imp-table-wrap{margin:22px 0;overflow-x:auto;}
table.imp-table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
  border:1px solid var(--line);
  border-radius:8px;
  overflow:hidden;
}
table.imp-table caption{
  caption-side:top;
  text-align:left;
  background:var(--navy);
  color:#fff;
  font-weight:700;
  font-size:14px;
  padding:11px 16px;
}
table.imp-table td{
  padding:11px 16px;
  font-size:13.5px;
  border-bottom:1px solid #edf0f7;
  vertical-align:middle;
}
table.imp-table tr:last-child td{border-bottom:none;}
table.imp-table td.imp-label{
  font-weight:700;
  color:#26314f;
  width:38%;
  background:#f8f9fd;
}
.imp-link-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:var(--orange);
  color:#fff !important;
  font-weight:700;
  font-size:13px;
  padding:6px 14px;
  border-radius:6px;
}
.imp-link-btn:hover{background:var(--orange-deep);}

/* Also style any plain/Gutenberg table a writer adds directly in post content */
.post-content table:not(.imp-table){
  width:100%;
  border-collapse:collapse;
  margin:20px 0;
}
.post-content table:not(.imp-table) th{
  background:var(--navy);
  color:#fff;
  font-size:13.5px;
  padding:10px 14px;
  text-align:left;
}
.post-content table:not(.imp-table) td{
  padding:10px 14px;
  font-size:13.5px;
  border-bottom:1px solid #edf0f7;
}
.post-content table:not(.imp-table) tr:nth-child(even) td{background:#f8f9fd;}

/* ===== FAQ accordion ===== */
.faq-box{margin:26px 0;}
.faq-title{
  font-weight:800;
  font-size:17px;
  color:var(--navy);
  margin-bottom:10px;
  font-family:Georgia,'Merriweather',serif;
}
.faq-item{
  background:#fff;
  border:1px solid var(--line);
  border-radius:8px;
  margin-bottom:10px;
  overflow:hidden;
}
.faq-item summary{
  cursor:pointer;
  list-style:none;
  padding:13px 42px 13px 16px;
  font-weight:700;
  font-size:14px;
  color:#20294a;
  position:relative;
}
.faq-item summary::-webkit-details-marker{display:none;}
.faq-item summary::after{
  content:"+";
  position:absolute;
  right:16px;
  top:50%;
  transform:translateY(-50%);
  color:var(--orange);
  font-size:19px;
  font-weight:700;
  line-height:1;
}
.faq-item[open] summary::after{content:"−";}
.faq-item[open] summary{border-bottom:1px solid var(--line);background:#fbf6f0;}
.faq-answer{padding:12px 16px 14px;font-size:13.5px;line-height:1.7;color:#3b4460;}
.faq-answer p{margin:0 0 10px;}
.faq-answer p:last-child{margin-bottom:0;}
.breadcrumb{font-size:12.5px;color:var(--ink-soft);padding:16px 20px 0;max-width:1180px;margin:0 auto;}
.breadcrumb a:hover{color:var(--orange-deep);}

/* ===== Footer ===== */
footer.site-footer{background:var(--navy-deep);color:#aab4d4;padding:34px 20px 24px;margin-top:20px;}
.footer-inner{max-width:1180px;margin:0 auto;}
.footer-top{display:flex;align-items:center;gap:12px;margin-bottom:18px;}
.footer-top img{height:30px;}
.footer-top span{color:#fff;font-family:Georgia,'Merriweather',serif;font-weight:900;font-size:17px;}
.footer-links{display:grid;grid-template-columns:repeat(4,1fr);gap:10px 20px;font-size:13px;margin-bottom:24px;}
.footer-links a:hover{color:#fff;}
.footer-bottom{border-top:1px solid rgba(255,255,255,.08);padding-top:16px;font-size:12px;line-height:1.7;color:#7e89ad;}

/* ===== Responsive ===== */
@media (max-width:900px){
  .grid{grid-template-columns:repeat(2,1fr);}
  .trending{grid-template-columns:repeat(2,1fr);}
  .footer-links{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:560px){
  .grid{grid-template-columns:1fr;}
  .brand{flex-direction:column;}
  .brand-text{text-align:center;}
  .brand-text .name{font-size:26px;}
}
:focus-visible{outline:2px solid var(--orange);outline-offset:2px;}
