/* ================================================================
   KHATRI LEGAL — HEADER CSS v2
   Fixes: duplicate title, white post cards, invisible text,
          blue meta text
   WP Settings > General > Site Title must be: KHATRIlegal
   ================================================================ */

/* ── 1. HEADER BAR ─────────────────────────────────────────── */
#masthead,
.site-header,
.ast-primary-header-bar,
.main-header-bar {
  background-color: #071628 !important;
  border-bottom: 1px solid rgba(201,168,76,0.22) !important;
  padding: 0 !important;
  min-height: 64px !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 999 !important;
}

/* ── 2. LOGO — FIX DUPLICATE TITLE ─────────────────────────── */
/* § symbol before wordmark */
.ast-site-identity::before {
  content: "§";
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1rem;
  color: rgba(201,168,76,0.5);
  margin-right: 0.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.ast-site-identity {
  display: flex !important;
  align-items: center !important;
}

/* Logo anchor — base styles */
.ast-site-identity .site-title a,
.ast-site-identity .site-title a:visited {
  font-family: 'Libre Baskerville', Georgia, serif !important;
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em !important;
  text-decoration: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  display: inline-flex !important;
  align-items: baseline !important;
  line-height: 1.2 !important;
  background: none !important;
  background-clip: unset !important;
  -webkit-background-clip: unset !important;
}

/* No pseudo-element injection — wordmark is PHP-rendered spans */
.ast-site-identity .site-title a::before,
.ast-site-identity .site-title a::after {
  content: none !important;
  display: none !important;
}

/* KHATRI span — white, uppercase, bold */
.ast-site-identity .site-title a .kl-logo-khatri {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
}

/* legal span — gold, italic */
.ast-site-identity .site-title a .kl-logo-legal {
  color: #C9A84C !important;
  -webkit-text-fill-color: #C9A84C !important;
  font-weight: 400 !important;
  font-style: italic !important;
  letter-spacing: 0.02em !important;
  margin-left: 0.05em !important;
}

/* Mobile — same spans, slightly smaller */
.ast-header-break-point .ast-site-identity .site-title a {
  font-size: 1.15rem !important;
}

/* Hide tagline */
.ast-site-identity .site-description {
  display: none !important;
}

/* ── 3. NAVIGATION ──────────────────────────────────────────── */
.ast-nav-menu > li > a,
#ast-desktop-header .ast-nav-menu > li > a {
  font-family: 'Source Sans 3', system-ui, sans-serif !important;
  font-size: 0.76rem !important;
  font-weight: 600 !important;
  color: #9AABBF !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  padding: 0.5rem 0.7rem !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
}

.ast-nav-menu > li > a:hover,
#ast-desktop-header .ast-nav-menu > li > a:hover,
.ast-nav-menu > li.current-menu-item > a,
.ast-nav-menu > li.current_page_item > a {
  color: #C9A84C !important;
}

/* ── 4. DROPDOWN MENUS ─────────────────────────────────────── */
.ast-nav-menu .sub-menu {
  background: #0D2240 !important;
  border: 1px solid rgba(201,168,76,0.18) !important;
  border-top: 2px solid #C9A84C !important;
  box-shadow: 0 16px 40px rgba(0,0,0,0.45) !important;
}

.ast-nav-menu .sub-menu li a {
  font-size: 0.82rem !important;
  color: #9AABBF !important;
  padding: 0.6rem 1.2rem !important;
  text-transform: none !important;
}

.ast-nav-menu .sub-menu li a:hover {
  background: rgba(201,168,76,0.07) !important;
  color: #C9A84C !important;
}

/* ── 5. MOBILE HEADER ──────────────────────────────────────── */
#ast-mobile-header,
.ast-mobile-header-wrap {
  background: #071628 !important;
  border-bottom: 1px solid rgba(201,168,76,0.22) !important;
}

.ast-header-break-point .ast-site-identity .site-title a {
  font-size: 1.15rem !important;
}

.ast-mobile-menu-trigger .ast-icon,
.ast-mobile-menu-trigger svg {
  color: #C9A84C !important;
  fill: #C9A84C !important;
  stroke: #C9A84C !important;
}

.ast-mobile-popup-drawer {
  background: #071628 !important;
}

.ast-header-break-point .ast-nav-menu > li > a {
  color: #9AABBF !important;
  border-bottom: 1px solid rgba(201,168,76,0.1) !important;
  padding: 0.85rem 1.5rem !important;
  font-size: 0.82rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.07em !important;
}

.ast-header-break-point .ast-nav-menu > li > a:hover {
  color: #C9A84C !important;
  background: rgba(201,168,76,0.05) !important;
}

/* ── 6. THIN GOLD ACCENT LINE ───────────────────────────────── */
body::before {
  content: "";
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #C9A84C 25%, #C9A84C 75%, transparent);
  z-index: 1001;
  opacity: 0.65;
  pointer-events: none;
}

/* ── 7. POST CARDS — FIX WHITE BACKGROUND ──────────────────── */
.ast-article-post,
article.type-post,
.hentry,
.blog .hentry,
.archive .hentry {
  background: rgba(17,40,71,0.9) !important;
  border: 1px solid rgba(201,168,76,0.15) !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.ast-article-post:hover,
article.type-post:hover {
  border-color: rgba(201,168,76,0.35) !important;
  box-shadow: 0 8px 28px rgba(0,0,0,0.4) !important;
}

/* Card inner areas */
.ast-blog-single-element,
.ast-article-inner,
.ast-blog-featured-section ~ div {
  background: transparent !important;
}

/* ── 8. POST CARD TEXT — FIX INVISIBLE TEXT ─────────────────── */
.entry-title,
.entry-title a,
.ast-article-post .entry-title,
.ast-article-post .entry-title a {
  color: #FFFFFF !important;
  font-family: 'Libre Baskerville', Georgia, serif !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  text-decoration: none !important;
}

.entry-title a:hover {
  color: #C9A84C !important;
}

.entry-summary,
.entry-summary p,
.entry-content,
.entry-content p,
.ast-article-post p {
  color: #C8C4BC !important;
  font-family: 'Source Sans 3', sans-serif !important;
  font-size: 0.95rem !important;
  line-height: 1.7 !important;
}

/* ── 9. POST META — FIX BLUE AUTHOR/DATE TEXT ──────────────── */
.entry-meta,
.entry-meta *,
.ast-post-meta,
.posted-on,
.posted-on a,
.byline,
.byline a,
.author,
.author a,
.cat-links,
.tags-links {
  font-family: 'Source Sans 3', sans-serif !important;
  font-size: 0.75rem !important;
  color: #6B7F96 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
}

.entry-meta a:hover,
.byline a:hover,
.posted-on a:hover {
  color: #C9A84C !important;
}

/* Category badge */
.cat-links a {
  background: rgba(201,168,76,0.1) !important;
  color: #C9A84C !important;
  padding: 0.15em 0.5em !important;
  border-radius: 2px !important;
  border: 1px solid rgba(201,168,76,0.2) !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
}

/* ── 10. NO FEATURED IMAGE — HIDE EMPTY PLACEHOLDER ─────────── */
.ast-blog-featured-section:not(:has(img)):not(:has(a)) {
  display: none !important;
}

/* ── 11. FOOTER ─────────────────────────────────────────────── */
.site-footer,
#colophon,
.ast-footer-copyright {
  background: #071628 !important;
  border-top: 1px solid rgba(201,168,76,0.18) !important;
  color: #6B7F96 !important;
  font-family: 'Source Sans 3', sans-serif !important;
  font-size: 0.8rem !important;
}

.site-footer a,
.ast-footer-copyright a {
  color: #C9A84C !important;
}

/* ── 12. ADMIN BAR OFFSET ───────────────────────────────────── */
.admin-bar #masthead,
.admin-bar .site-header {
  top: 32px !important;
}

@media screen and (max-width: 782px) {
  .admin-bar #masthead { top: 46px !important; }
}

/* ── 13. RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
  body::before { display: none; }
}

/* ── 14. HEADER ACTION BUTTONS (CTA + BACK LINK) ───────────── */
.kl-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: 1rem;
  flex-shrink: 0;
}

.kl-back-link {
  font-family: 'Source Sans 3', sans-serif !important;
  font-size: 0.68rem !important;
  color: rgba(154,171,191,0.45) !important;
  letter-spacing: 0.05em !important;
  text-decoration: none !important;
  border-left: 1px solid rgba(201,168,76,0.2) !important;
  padding-left: 0.8rem !important;
  transition: color 0.2s ease !important;
  white-space: nowrap !important;
}

.kl-back-link:hover {
  color: #C9A84C !important;
}

.kl-header-cta {
  font-family: 'Source Sans 3', sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.09em !important;
  text-transform: uppercase !important;
  color: #C9A84C !important;
  background: transparent !important;
  border: 1px solid rgba(201,168,76,0.55) !important;
  border-radius: 3px !important;
  padding: 0.42rem 0.9rem !important;
  text-decoration: none !important;
  transition: all 0.22s ease !important;
  white-space: nowrap !important;
  display: inline-block !important;
}

.kl-header-cta:hover {
  background: #C9A84C !important;
  color: #071628 !important;
  border-color: #C9A84C !important;
}

@media (max-width: 768px) {
  .kl-back-link { display: none !important; }
  .kl-header-cta { font-size: 0.68rem !important; padding: 0.38rem 0.7rem !important; }
}

/* ── GLOBAL WHITE KILLER — covers every Astra wrapper ──────── */
html,
body,
#page,
#page.site,
.site,
#content,
.site-content,
#primary,
.content-area,
#main,
.site-main,
.ast-container,
.ast-separate-container,
.ast-page-builder-template,
.ast-single-post-order,
.entry,
.hentry,
article {
  background-color: #0B1F3A !important;
  background-image: none !important;
}

/* Footer area white strip fix */
.site-footer,
#colophon,
.footer-widget-area,
.ast-footer-copyright,
.ast-small-footer,
.ast-footer-area {
  background-color: #071628 !important;
  background-image: none !important;
  border-top: 1px solid rgba(201,168,76,0.18) !important;
}

/* Kill any white from Astra's separate container layout */
.ast-separate-container .ast-article-post,
.ast-separate-container #primary,
.ast-separate-container .site-content {
  background: transparent !important;
}

/* The white gap between footer and content */
.ast-separate-container {
  background: #0B1F3A !important;
}
