/*
Theme Name: Conscient Hines Elevate Blog
Theme URI: https://www.conscientelevategurgaon.com/blog/
Description: Custom blog theme for conscientelevategurgaon.com, matched to the main site (Open Sans, #8d2700 / #a34217, 1280px container).
Author: Conscient Hines Elevate
Version: 1.2
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: che-blog
*/

/* ---------- Tokens ---------- */
:root {
  --che-primary: #8d2700;
  --che-primary-dark: #671c00;
  --che-secondary: #a34217;
  --che-cream: #fcf9ef;
  --che-body: #212529;
  --che-muted: #6c757d;
  --che-border: #dcdcdc;
  --che-line: rgba(141, 39, 0, 0.12);
  --che-container: 1600px;
  --che-radius: 0.5rem;
  --che-radius-lg: 1rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--che-body);
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; vertical-align: middle; border-style: none; }
figure { margin: 0 0 1rem; }
svg { vertical-align: middle; }

a { color: var(--che-primary); text-decoration: none; }
a:hover { color: var(--che-primary-dark); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 { margin-top: 0; margin-bottom: 0.75rem; font-weight: 700; line-height: 1.25; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
p { margin-top: 0; margin-bottom: 1rem; }

.che-container {
  width: 100%;
  max-width: var(--che-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}
@media (min-width: 1400px) {
  .che-container { padding-left: 40px; padding-right: 40px; }
}
.che-container--narrow { max-width: 1460px; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--che-primary); color: #fff;
  padding: 0.6rem 1rem; z-index: 9999;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Buttons ---------- */
.che-btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 0.25rem;
  border: 1px solid var(--che-primary);
  background-color: var(--che-primary);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}
.che-btn:hover { background-color: var(--che-primary-dark); border-color: var(--che-primary-dark); color: #fff; text-decoration: none; }
.che-btn--outline { background-color: transparent; color: var(--che-primary); }
.che-btn--outline:hover { background-color: var(--che-primary); color: #fff; }

/* ---------- Header ---------- */
.che-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background-color: #fff;
  border-bottom: 1px solid var(--che-line);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.05);
}
.che-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}
.che-brand { display: flex; align-items: center; }
.che-brand img, .che-brand svg { height: 52px; width: auto; display: block; }
.che-brand:hover { text-decoration: none; }
.che-brand__text { font-weight: 700; font-size: 1.15rem; color: var(--che-primary); }

.che-nav ul {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.che-nav a {
  display: block;
  padding: 1.1rem 1rem;
  color: #000;
  font-size: 0.95rem;
}
.che-nav a:hover { color: var(--che-primary); text-decoration: none; }
.che-nav .current-menu-item > a,
.che-nav .current_page_item > a,
.che-nav li.is-active > a {
  background-color: var(--che-primary);
  color: #fff;
}

.che-nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  line-height: 0;
  cursor: pointer;
}
.che-nav-toggle span {
  display: block;
  width: 26px; height: 2px;
  margin: 5px 0;
  background-color: var(--che-primary);
}

@media (max-width: 991px) {
  .che-brand img, .che-brand svg { height: 45px; }
  .che-nav-toggle { display: block; }
  .che-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--che-line);
    display: none;
  }
  .che-nav.is-open { display: block; }
  .che-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .che-nav a { padding: 0.85rem 1rem; border-top: 1px solid var(--che-line); }
}

/* ---------- Page head ---------- */
.che-pagehead {
  background-color: var(--che-cream);
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--che-line);
}
.che-pagehead h1 { margin-bottom: 0.35rem; }
.che-pagehead p { color: var(--che-muted); margin-bottom: 0; }

.che-breadcrumb {
  font-size: 0.85rem;
  color: var(--che-muted);
  margin-bottom: 0.75rem;
}
.che-breadcrumb a { color: var(--che-secondary); }
.che-breadcrumb span + span::before { content: "›"; padding: 0 0.45rem; color: var(--che-muted); }

/* ---------- Layout ---------- */
.che-main { padding: 3rem 0; }
.che-layout { display: flex; flex-wrap: wrap; gap: 2.5rem; }
.che-content { flex: 1 1 0; min-width: 0; }
.che-sidebar { width: 360px; flex-shrink: 0; }

@media (max-width: 991px) {
  .che-main { padding: 2rem 0; }
  .che-layout { gap: 2rem; }
  .che-sidebar { width: 100%; }
}

/* ---------- Post grid ---------- */
.che-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem;
}
@media (max-width: 767px) { .che-grid { grid-template-columns: 1fr; } }

.che-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--che-line);
  border-radius: var(--che-radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.che-card:hover { box-shadow: 0 10px 30px rgba(141, 39, 0, 0.12); transform: translateY(-3px); }
.che-card__media { display: block; overflow: hidden; background: var(--che-cream); }
.che-card__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.che-card__body { padding: 1.25rem 1.35rem 1.5rem; display: flex; flex-direction: column; flex: 1 1 auto; }
.che-card__cat {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--che-secondary);
  margin-bottom: 0.5rem;
}
.che-card__title { font-size: 1.2rem; margin-bottom: 0.5rem; }
.che-card__title a { color: var(--che-body); }
.che-card__title a:hover { color: var(--che-primary); text-decoration: none; }
.che-card__excerpt { color: #495057; font-size: 0.95rem; margin-bottom: 1rem; }
.che-card__meta {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px dotted var(--che-border);
  font-size: 0.82rem;
  color: var(--che-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

/* ---------- Single ---------- */
.che-article__header { margin-bottom: 1.5rem; }
.che-article__header h1 { font-size: 2.1rem; }
.che-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.88rem;
  color: var(--che-muted);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--che-line);
}
.che-meta strong { color: var(--che-body); font-weight: 700; }

.che-featured { margin: 1.5rem 0 2rem; }
.che-featured img { width: 100%; border-radius: var(--che-radius-lg); display: block; }

.che-entry { font-size: 1.02rem; line-height: 1.75; }
.che-entry > *:first-child { margin-top: 0; }
.che-entry h2 {
  font-size: 1.6rem;
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--che-line);
}
.che-entry h3 { font-size: 1.3rem; margin-top: 1.85rem; color: var(--che-secondary); }
.che-entry h4 { font-size: 1.1rem; margin-top: 1.5rem; }
.che-entry ul, .che-entry ol { padding-left: 1.35rem; margin-bottom: 1.25rem; }
.che-entry li { margin-bottom: 0.5rem; }
.che-entry img { border-radius: var(--che-radius); }
.che-entry figcaption { font-size: 0.85rem; color: var(--che-muted); text-align: center; padding-top: 0.5rem; }
.che-entry blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.35rem;
  background: var(--che-cream);
  border-left: 4px solid var(--che-secondary);
  border-radius: 0 var(--che-radius) var(--che-radius) 0;
}
.che-entry blockquote p:last-child { margin-bottom: 0; }
.che-entry a { text-decoration: underline; }

.che-entry table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.che-entry table th,
.che-entry table td {
  border: 1px solid var(--che-line);
  padding: 0.7rem 0.85rem;
  text-align: left;
  vertical-align: top;
}
.che-entry table thead th { background-color: var(--che-primary); color: #fff; border-color: var(--che-primary); }
.che-entry table tbody tr:nth-child(even) { background-color: rgba(175, 88, 53, 0.06); }
.che-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1.5rem; }
.che-table-scroll > table { margin-bottom: 0; }

.che-tags { margin: 2rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--che-line); font-size: 0.88rem; }
.che-tags a {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  margin: 0 0.35rem 0.35rem 0;
  border: 1px solid var(--che-line);
  border-radius: 50rem;
  color: var(--che-secondary);
}
.che-tags a:hover { background: var(--che-primary); border-color: var(--che-primary); color: #fff; text-decoration: none; }

/* ---------- Project CTA ---------- */
.che-cta {
  margin: 2.5rem 0 0;
  padding: 2rem 1.75rem;
  background: rgba(175, 88, 53, 0.12);
  border: 1px solid rgba(175, 88, 53, 0.3);
  border-radius: var(--che-radius-lg);
  text-align: center;
}
.che-cta h2 { font-size: 1.45rem; margin-bottom: 0.5rem; }
.che-cta p { color: #495057; max-width: 620px; margin: 0 auto 1.25rem; }

/* ---------- Post navigation ---------- */
.che-postnav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}
.che-postnav__item {
  flex: 1 1 240px;
  border: 1px solid var(--che-line);
  border-radius: var(--che-radius);
  padding: 1rem 1.15rem;
}
.che-postnav__label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--che-muted); margin-bottom: 0.3rem; }
.che-postnav__item a { font-weight: 700; color: var(--che-body); }
.che-postnav__item a:hover { color: var(--che-primary); text-decoration: none; }
.che-postnav__item--next { text-align: right; }

/* ---------- Related ---------- */
.che-related { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--che-line); }
.che-related h2 { font-size: 1.5rem; margin-bottom: 1.25rem; }

/* ---------- Sidebar ---------- */
.che-widget {
  background: #fff;
  border: 1px solid var(--che-line);
  border-radius: var(--che-radius-lg);
  padding: 1.35rem 1.4rem;
  margin-bottom: 1.5rem;
}
.che-widget__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--che-primary);
}
.che-widget ul { list-style: none; margin: 0; padding: 0; }
.che-widget li { padding: 0.55rem 0; border-bottom: 1px dotted var(--che-border); font-size: 0.94rem; }
.che-widget li:last-child { border-bottom: 0; padding-bottom: 0; }
.che-widget a { color: var(--che-body); }
.che-widget a:hover { color: var(--che-primary); text-decoration: none; }

.che-widget--project { background: var(--che-cream); border-color: rgba(175, 88, 53, 0.3); }
.che-widget--project .che-facts { list-style: none; margin: 0 0 1.1rem; padding: 0; }
.che-widget--project .che-facts li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(175, 88, 53, 0.2);
}
.che-widget--project .che-facts strong { font-weight: 700; }
.che-widget--project .che-btn { width: 100%; text-align: center; }

.che-searchform { display: flex; gap: 0.5rem; }
.che-searchform input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 2.7rem;
  padding: 0.375rem 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: #495057;
  border: 1px solid var(--che-border);
  border-radius: 0.25rem;
}
.che-searchform input[type="search"]:focus { outline: 0; border-color: var(--che-secondary); box-shadow: 0 0 0 0.2rem rgba(141, 39, 0, 0.15); }
.che-searchform button { flex-shrink: 0; }

/* ---------- Sticky sidebar ---------- */
@media (min-width: 992px) {
  .che-layout { align-items: flex-start; }

  .che-sidebar {
    position: sticky;
    align-self: flex-start;
    top: 88px;
    max-height: calc(100vh - 108px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--che-primary) transparent;
  }
  .che-sidebar::-webkit-scrollbar { width: 6px; }
  .che-sidebar::-webkit-scrollbar-track { background: transparent; }
  .che-sidebar::-webkit-scrollbar-thumb { background: var(--che-primary); border-radius: 3px; }

  /* Clear the WordPress admin bar for logged-in users. */
  body.admin-bar .che-sidebar { top: 120px; max-height: calc(100vh - 140px); }
}

/* ---------- Pagination ---------- */
.che-pagination { margin-top: 2.5rem; }
.che-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }
.che-pagination .page-numbers {
  display: inline-block;
  min-width: 2.5rem;
  padding: 0.5rem 0.75rem;
  text-align: center;
  border: 1px solid var(--che-line);
  border-radius: 0.25rem;
  color: var(--che-body);
}
.che-pagination .page-numbers:hover { background: var(--che-cream); text-decoration: none; }
.che-pagination .page-numbers.current { background: var(--che-primary); border-color: var(--che-primary); color: #fff; }

/* ---------- Comments ---------- */
.che-comments { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--che-line); }
.che-comments h2, .che-comments h3 { font-size: 1.35rem; }
.che-comments .comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.che-comments .comment-list li { padding: 1.15rem 0; border-bottom: 1px dotted var(--che-border); }
.che-comments .comment-list .children { list-style: none; padding-left: 1.5rem; }
.che-comments .comment-meta { font-size: 0.85rem; color: var(--che-muted); margin-bottom: 0.4rem; }
.che-comments input[type="text"],
.che-comments input[type="email"],
.che-comments input[type="url"],
.che-comments textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--che-border);
  border-radius: 0.25rem;
}
.che-comments textarea { min-height: 140px; }
.che-comments .comment-form p { margin-bottom: 1rem; }
.che-comments label { display: block; font-size: 0.85rem; color: var(--che-muted); margin-bottom: 0.25rem; }
.che-comments .submit { display: inline-block; padding: 0.6rem 1.4rem; font-weight: 700; border: 1px solid var(--che-primary); background: var(--che-primary); color: #fff; border-radius: 0.25rem; cursor: pointer; }

/* ---------- Footer ---------- */
.che-footer {
  background-color: #fff;
  border-top: 1px solid var(--che-line);
  padding: 2.5rem 0 2rem;
  text-align: center;
}
.che-footer__links ul { list-style: none; margin: 0; padding: 0; }
.che-footer__links li { display: inline-block; border-left: 1px solid var(--che-primary); }
.che-footer__links li:first-child { border-left: 0; }
.che-footer__links a { display: block; padding: 0 0.6rem; font-size: 0.95rem; }
.che-footer__copy {
  display: inline-block;
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 1px dotted #495057;
  color: var(--che-muted);
  font-size: 0.9rem;
}
.che-footer__legal {
  margin: 1rem auto 0;
  max-width: 900px;
  padding-top: 0.75rem;
  border-top: 1px dotted #adb5bd;
  color: #495057;
  font-size: 0.8125rem;
  line-height: 1.6;
}
.che-footer__legal p { margin-bottom: 0.35rem; }
.che-footer__legal a { text-decoration: underline; }

/* ---------- WordPress core classes ---------- */
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide, .alignfull { max-width: 100%; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--che-muted); text-align: center; }
.sticky, .gallery-caption, .bypostauthor { display: block; }
.wp-block-image { margin-bottom: 1.5rem; }