/*
Theme Name: Privij Blog
Theme URI: https://privij.com/blog/
Author: Privij Consultants Engineering Pvt. Ltd.
Author URI: https://privij.com
Description: Custom blog theme for PRIVIJ Consultants Engineering — Architectural & Engineering Consultancy. Built for the /blog/ section with breadcrumbs, category/tag archives, search and a full sidebar.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: privij-blog
*/

:root{
  --navy:#0F2E5C;
  --blue:#1B4F9C;
  --blue-light:#E9F0FC;
  --orange:#F5941E;
  --red:#E63946;
  --yellow:#FFC93C;
  --ink:#171B26;
  --muted:#5C6577;
  --line:#E3E7EE;
  --bg:#F6F7FA;
  --white:#ffffff;
}
*{box-sizing:border-box;}
body{
  margin:0;
  font-family:'Inter', sans-serif;
  background:var(--bg);
  color:var(--ink);
  line-height:1.6;
}
a{color:inherit; text-decoration:none;}
img{max-width:100%; display:block;}
ul{list-style:none; margin:0; padding:0;}
.mono{font-family:'IBM Plex Mono', monospace;}
.screen-reader-text{position:absolute; left:-9999px;}

/* ===== Top utility bar ===== */
.topbar{background:var(--navy); color:#cfd9ec; font-size:12.5px;}
.topbar-inner{max-width:1180px; margin:0 auto; padding:8px 24px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:6px;}
.topbar a{opacity:.85} .topbar a:hover{opacity:1}

/* ===== Header / nav ===== */
header.site{background:var(--white); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:60;}
.header-inner{max-width:1180px; margin:0 auto; padding:14px 24px; display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap;}
.brand{display:flex; align-items:center; gap:10px;}
.brand img.logo{height:42px; width:auto;}
.brand-fallback-name{font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:22px; color:var(--navy);}

nav.primary-nav{position:relative;}
nav.primary-nav > ul{display:flex; gap:22px; flex-wrap:wrap;}
nav.primary-nav > ul > li{position:relative;}
nav.primary-nav > ul > li > a{
  display:block; padding:10px 2px; font-weight:600; font-size:14px; color:var(--ink); position:relative;
}
nav.primary-nav > ul > li.current-menu-item > a,
nav.primary-nav > ul > li.current_page_item > a,
nav.primary-nav > ul > li.current-menu-parent > a{color:var(--blue);}
nav.primary-nav > ul > li.current-menu-item > a::after{content:""; position:absolute; left:2px; right:2px; bottom:4px; height:2px; background:var(--orange);}

nav.primary-nav li.menu-item-has-children > a::after{content:"▾"; font-size:10px; margin-left:5px; color:var(--muted); display:inline-block;}
nav.primary-nav ul ul{
  display:none; position:absolute; top:100%; left:0; background:#fff; min-width:280px;
  border:1px solid var(--line); border-radius:6px; box-shadow:0 16px 32px -12px rgba(15,46,92,.25);
  padding:8px; z-index:70;
}
nav.primary-nav li.menu-item-has-children:hover > ul{display:block;}
nav.primary-nav ul ul li a{
  padding:9px 12px; font-size:13.5px; font-weight:500; border-radius:4px; display:block;
}
nav.primary-nav ul ul li a:hover{background:var(--blue-light); color:var(--blue);}

.mobile-toggle{display:none; background:none; border:1px solid var(--line); border-radius:4px; padding:8px 10px; cursor:pointer;}
@media (max-width:960px){
  .mobile-toggle{display:block;}
  nav.primary-nav{width:100%; display:none;}
  nav.primary-nav.open{display:block;}
  nav.primary-nav > ul{flex-direction:column; gap:0; border-top:1px solid var(--line); margin-top:12px; padding-top:8px;}
  nav.primary-nav ul ul{position:static; box-shadow:none; border:none; display:block; padding-left:14px; margin-bottom:6px;}
  nav.primary-nav li.menu-item-has-children:hover > ul{display:none;}
  nav.primary-nav li.menu-item-has-children.open > ul{display:block;}
}

/* ===== Breadcrumb / hero band ===== */
.breadcrumb-band{
  background:
    linear-gradient(120deg, rgba(15,46,92,.94), rgba(27,79,156,.9)),
    repeating-linear-gradient(0deg, rgba(255,255,255,.045) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 1px, transparent 1px 34px);
  color:#fff; padding:34px 24px;
}
.breadcrumb-inner{max-width:1180px; margin:0 auto;}
.crumbs{font-family:'IBM Plex Mono'; font-size:12.5px; color:#B9CBEE; display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:12px;}
.crumbs a:hover{color:#fff;}
.crumbs .sep{color:var(--orange);}
.crumbs .current{color:var(--yellow);}
.page-title{font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:clamp(26px,4vw,38px);}
.page-sub{color:#C7D5EF; margin-top:8px; font-size:15px; max-width:640px;}

/* ===== Layout ===== */
.layout{max-width:1180px; margin:0 auto; padding:40px 24px 80px; display:grid; grid-template-columns:1fr 320px; gap:40px;}
@media (max-width:880px){ .layout{grid-template-columns:1fr;} }

/* ===== Filter / taxonomy strip ===== */
.filter-strip{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:28px;}
.filter-chip{font-size:13px; font-weight:600; padding:7px 14px; border-radius:20px; border:1px solid var(--line); background:#fff; color:var(--muted); display:inline-block;}
.filter-chip.active{background:var(--blue); border-color:var(--blue); color:#fff;}
.filter-chip:hover{border-color:var(--blue); color:var(--blue);}
.filter-chip.active:hover{color:#fff;}

/* ===== Featured post ===== */
.featured{background:#fff; border:1px solid var(--line); border-radius:6px; overflow:hidden; display:grid; grid-template-columns:1.1fr 1fr; margin-bottom:36px; position:relative;}
@media (max-width:640px){ .featured{grid-template-columns:1fr;} }
.featured .img-wrap{position:relative; min-height:260px; background:linear-gradient(135deg,var(--blue),var(--navy));}
.featured .img-wrap img{width:100%; height:100%; object-fit:cover; position:absolute; inset:0;}
.corner-mark{position:absolute; width:18px; height:18px; border-color:var(--yellow); opacity:0; transition:opacity .2s ease;}
.featured:hover .corner-mark, .post-card:hover .corner-mark{opacity:1;}
.cm-tl{top:10px; left:10px; border-top:2px solid; border-left:2px solid;}
.cm-br{bottom:10px; right:10px; border-bottom:2px solid; border-right:2px solid;}
.featured-body{padding:32px; display:flex; flex-direction:column; justify-content:center;}
.eyebrow{display:inline-flex; align-items:center; gap:6px; font-family:'IBM Plex Mono'; font-size:11.5px; font-weight:600; color:var(--orange); text-transform:uppercase; letter-spacing:.06em; margin-bottom:12px;}
.eyebrow::before{content:""; width:14px; height:2px; background:var(--orange); display:inline-block;}
.featured-body h2{font-family:'Space Grotesk',sans-serif; font-size:26px; font-weight:700; line-height:1.25; margin:0 0 12px;}
.featured-body h2 a:hover{color:var(--blue);}
.featured-body p.excerpt{color:var(--muted); font-size:14.5px; margin-bottom:18px;}
.post-meta{display:flex; align-items:center; gap:14px; font-size:12.5px; color:var(--muted); font-family:'IBM Plex Mono'; flex-wrap:wrap;}
.post-meta .dot{width:3px; height:3px; border-radius:50%; background:var(--muted);}
.avatar{width:22px; height:22px; border-radius:50%; background:var(--yellow); display:inline-block; overflow:hidden;}
.avatar img{width:100%; height:100%; object-fit:cover;}

/* ===== Section label ===== */
.section-label{display:flex; align-items:center; gap:12px; margin-bottom:20px;}
.section-label h3{font-family:'Space Grotesk',sans-serif; font-size:14px; text-transform:uppercase; letter-spacing:.06em; color:var(--navy); margin:0;}
.section-label .rule{flex:1; height:1px; background:var(--line);}

/* ===== Post grid / cards ===== */
.post-grid{display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-bottom:36px;}
@media (max-width:640px){ .post-grid{grid-template-columns:1fr;} }
.post-card{background:#fff; border:1px solid var(--line); border-radius:6px; overflow:hidden; display:flex; flex-direction:column; position:relative; transition:box-shadow .2s ease, transform .2s ease;}
.post-card:hover{box-shadow:0 12px 28px -14px rgba(15,46,92,.28); transform:translateY(-2px);}
.post-card .thumb{height:180px; position:relative; background:linear-gradient(135deg,#dfe8f7,#c4d5f0);}
.post-card .thumb img{width:100%; height:100%; object-fit:cover; position:absolute; inset:0;}
.cat-pill{position:absolute; top:12px; left:12px; background:rgba(15,46,92,.9); color:#fff; font-family:'IBM Plex Mono'; font-size:10.5px; font-weight:600; padding:5px 10px; border-radius:3px; letter-spacing:.04em; text-transform:uppercase;}
.post-card .body{padding:20px; display:flex; flex-direction:column; flex:1;}
.post-card h4{font-family:'Space Grotesk',sans-serif; font-size:17px; font-weight:700; line-height:1.35; margin:0 0 10px;}
.post-card h4 a:hover{color:var(--blue);}
.post-card p{color:var(--muted); font-size:13.5px; flex:1; margin:0 0 14px;}
.post-card .post-meta{font-size:11.5px;}

/* ===== Pagination ===== */
.pagination{display:flex; align-items:center; justify-content:center; gap:6px; margin-top:8px; flex-wrap:wrap;}
.pagination a, .pagination span{min-width:34px; height:34px; padding:0 6px; display:flex; align-items:center; justify-content:center; border:1px solid var(--line); border-radius:4px; font-family:'IBM Plex Mono'; font-size:13px; color:var(--muted); background:#fff;}
.pagination a:hover{border-color:var(--blue); color:var(--blue);}
.pagination .current{background:var(--blue); color:#fff; border-color:var(--blue); font-weight:600;}

/* ===== Sidebar widgets ===== */
aside.sidebar{display:flex; flex-direction:column; gap:24px;}
.widget{background:#fff; border:1px solid var(--line); border-radius:6px; padding:22px;}
.widget h5, .widget .widget-title{font-family:'Space Grotesk',sans-serif; font-size:13.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--navy); margin:0 0 16px; display:flex; align-items:center; gap:8px;}
.widget h5::before, .widget .widget-title::before{content:""; width:4px; height:14px; background:var(--orange); display:inline-block; border-radius:2px;}

.search-box{position:relative;}
.search-box input[type="search"], .search-box input[type="text"]{width:100%; padding:11px 42px 11px 14px; border:1px solid var(--line); border-radius:4px; font-size:14px; font-family:'Inter'; background:var(--bg);}
.search-box input:focus{outline:2px solid var(--blue); outline-offset:1px; background:#fff;}
.search-box button{position:absolute; right:6px; top:50%; transform:translateY(-50%); background:var(--blue); border:none; width:30px; height:30px; border-radius:3px; cursor:pointer; display:flex; align-items:center; justify-content:center;}
.search-box svg{width:15px; height:15px; stroke:#fff;}

.cat-list li{display:flex; justify-content:space-between; align-items:center; padding:10px 0; border-bottom:1px solid var(--line); font-size:14px; font-weight:500;}
.cat-list li:last-child{border-bottom:none; padding-bottom:0;}
.cat-list a:hover{color:var(--blue);}
.cat-list .count{font-family:'IBM Plex Mono'; font-size:11.5px; color:var(--muted); background:var(--bg); padding:2px 8px; border-radius:10px;}

.recent-post{display:flex; gap:12px; padding:12px 0; border-bottom:1px solid var(--line);}
.recent-post:last-child{border-bottom:none; padding-bottom:0;}
.recent-post .thumb{width:56px; height:56px; border-radius:4px; flex-shrink:0; background:linear-gradient(135deg,var(--blue),var(--navy)); position:relative; overflow:hidden;}
.recent-post .thumb img{width:100%; height:100%; object-fit:cover; position:absolute; inset:0;}
.recent-post .info h6{font-size:13.5px; font-weight:600; line-height:1.35; margin:0 0 4px;}
.recent-post .info h6 a:hover{color:var(--blue);}
.recent-post .info span{font-family:'IBM Plex Mono'; font-size:11px; color:var(--muted);}

.tag-cloud{display:flex; flex-wrap:wrap; gap:8px;}
.tag-cloud a{font-size:12px !important; font-weight:600; padding:6px 12px; border-radius:3px; background:var(--bg); color:var(--ink); border:1px solid var(--line); font-family:'IBM Plex Mono'; display:inline-block;}
.tag-cloud a:hover{background:var(--blue); color:#fff; border-color:var(--blue);}

.cta-widget{background:linear-gradient(135deg, var(--navy), var(--blue)); color:#fff; border:none;}
.cta-widget h5, .cta-widget .widget-title{color:#fff;}
.cta-widget h5::before, .cta-widget .widget-title::before{background:var(--yellow);}
.cta-widget p{font-size:13.5px; color:#CFDCF3; margin-bottom:16px;}
.cta-widget input{width:100%; padding:10px 12px; border-radius:4px; border:1px solid rgba(255,255,255,.25); background:rgba(255,255,255,.08); color:#fff; font-size:13.5px; margin-bottom:10px;}
.cta-widget input::placeholder{color:#A9BEE0;}
.cta-widget button{width:100%; padding:11px; border-radius:4px; border:none; background:var(--orange); color:#fff; font-weight:700; font-size:13.5px; cursor:pointer;}
.cta-widget button:hover{background:#e07f0a;}

.toc li{counter-increment:toc; padding:8px 0; font-size:13.5px; border-bottom:1px solid var(--line); display:flex; gap:10px;}
.toc{counter-reset:toc;}
.toc li:last-child{border-bottom:none;}
.toc li::before{content:counter(toc,decimal-leading-zero); font-family:'IBM Plex Mono'; color:var(--orange); font-weight:600; font-size:12px;}

/* ===== Single post article ===== */
article.post{background:#fff; border:1px solid var(--line); border-radius:6px; overflow:hidden;}
.post-header{padding:36px 40px 28px;}
.post-header h1{font-family:'Space Grotesk',sans-serif; font-size:clamp(26px,3.4vw,36px); font-weight:700; line-height:1.28; margin:0 0 18px;}
.post-meta-row{display:flex; align-items:center; gap:16px; flex-wrap:wrap; font-size:13px; color:var(--muted); padding-top:18px; border-top:1px solid var(--line);}
.author{display:flex; align-items:center; gap:10px;}
.author .avatar{width:34px; height:34px;}
.author .name{font-weight:600; color:var(--ink); font-size:13.5px;}
.author .role{font-size:11.5px;}

.featured-image{position:relative; min-height:220px; background:linear-gradient(135deg,var(--blue),var(--navy));}
.featured-image img{width:100%; height:auto; display:block;}
.img-caption{background:#F0F3F9; color:var(--muted); font-size:12px; padding:10px 40px; border-bottom:1px solid var(--line); font-family:'IBM Plex Mono';}

.post-body{padding:36px 40px 8px; font-size:16px; color:#2B2F3B;}
.post-body p{margin:0 0 20px;}
.post-body h2{font-family:'Space Grotesk',sans-serif; font-size:23px; margin:32px 0 14px; color:var(--navy); position:relative; padding-left:16px;}
.post-body h2::before{content:""; position:absolute; left:0; top:4px; bottom:4px; width:4px; background:var(--orange); border-radius:2px;}
.post-body h3{font-family:'Space Grotesk',sans-serif; font-size:18.5px; margin:26px 0 10px;}
.post-body ul, .post-body ol{margin:0 0 20px 20px; list-style:disc;}
.post-body img{border-radius:6px; margin:12px 0;}
.post-body blockquote{border-left:3px dashed var(--blue); margin:28px 0; padding:6px 0 6px 22px; font-family:'Space Grotesk',sans-serif; font-size:19px; font-weight:600; color:var(--navy); line-height:1.5;}

.post-footer{padding:8px 40px 36px;}
.tag-row{display:flex; flex-wrap:wrap; gap:8px; margin:22px 0 28px; padding-top:22px; border-top:1px solid var(--line);}
.tag-row a{font-size:12px; font-weight:600; padding:6px 12px; border-radius:3px; background:var(--bg); border:1px solid var(--line); font-family:'IBM Plex Mono'; display:inline-block;}
.tag-row a:hover{background:var(--blue); color:#fff; border-color:var(--blue);}

.share-row{display:flex; align-items:center; gap:12px; flex-wrap:wrap;}
.share-row span.label{font-size:13px; font-weight:600; color:var(--muted);}
.share-btn{width:34px; height:34px; border-radius:50%; border:1px solid var(--line); display:flex; align-items:center; justify-content:center; background:#fff;}
.share-btn:hover{border-color:var(--blue); color:var(--blue);}

.author-box{margin:0 40px 36px; padding:24px; background:var(--bg); border-radius:6px; border:1px solid var(--line); display:flex; gap:16px; flex-wrap:wrap;}
.author-box .avatar{width:56px; height:56px;}
.author-box h6{font-family:'Space Grotesk',sans-serif; font-size:15.5px; margin:0 0 4px;}
.author-box .role{font-size:12px; color:var(--orange); font-weight:600; margin-bottom:8px; font-family:'IBM Plex Mono'; text-transform:uppercase; letter-spacing:.03em;}
.author-box p{font-size:13.5px; color:var(--muted); margin:0;}

.related{margin-top:36px;}
.related-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:20px;}
@media (max-width:880px){ .related-grid{grid-template-columns:1fr;} }
.related-card{background:#fff; border:1px solid var(--line); border-radius:6px; overflow:hidden;}
.related-card .thumb{height:130px; position:relative; background:linear-gradient(135deg,#dfe8f7,#c4d5f0);}
.related-card .thumb img{width:100%; height:100%; object-fit:cover; position:absolute; inset:0;}
.related-card .body{padding:16px;}
.related-card h5{font-family:'Space Grotesk',sans-serif; font-size:14.5px; line-height:1.35; margin:0 0 6px;}
.related-card h5 a:hover{color:var(--blue);}
.related-card span{font-size:11px; color:var(--muted); font-family:'IBM Plex Mono';}

/* ===== Comments ===== */
.comments-area{margin-top:36px; background:#fff; border:1px solid var(--line); border-radius:6px; padding:32px;}
.comments-title{font-family:'Space Grotesk',sans-serif; font-size:18px; margin:0 0 20px;}
.comment-list{list-style:none; margin:0; padding:0;}
.comment-body{display:flex; gap:14px; padding:18px 0; border-bottom:1px solid var(--line);}
.comment-list > li:last-child > .comment-body{border-bottom:none;}
.comment-body .avatar-wrap img{width:38px; height:38px; border-radius:50%; flex-shrink:0;}
.comment-author-name{font-weight:700; font-size:13.5px;}
.comment-time{font-size:11.5px; color:var(--muted); font-family:'IBM Plex Mono'; margin-left:8px;}
.comment-body p{font-size:13.5px; color:#3A3F4C; margin:6px 0 0;}
.comment-reply{margin-left:56px;}
#respond{margin-top:24px;}
.comment-form textarea{width:100%; min-height:100px; border:1px solid var(--line); border-radius:4px; padding:12px; font-family:'Inter'; font-size:13.5px; resize:vertical; margin-bottom:12px;}
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"]{width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:4px; font-size:13.5px; margin-bottom:12px;}
.comment-form-row{display:grid; grid-template-columns:1fr 1fr; gap:12px;}
@media (max-width:600px){ .comment-form-row{grid-template-columns:1fr;} }
.comment-form input[type="submit"]{background:var(--blue); color:#fff; border:none; padding:11px 22px; border-radius:4px; font-weight:700; font-size:13.5px; cursor:pointer;}
.comment-form input[type="submit"]:hover{background:var(--navy);}

/* ===== Footer ===== */
footer.site{background:var(--navy); color:#A9BEE0; text-align:center; padding:26px 24px; font-size:13px;}
footer.site strong{color:#fff;}
footer.site a:hover{color:#fff;}

/* ===== 404 / no results ===== */
.no-results{background:#fff; border:1px solid var(--line); border-radius:6px; padding:50px 30px; text-align:center;}
.no-results h2{font-family:'Space Grotesk',sans-serif; margin-bottom:10px;}
.no-results p{color:var(--muted); margin-bottom:18px;}
