/*
Theme Name: BARFI Institute
Theme URI: https://barfi.institute
Author: BARFI Institute
Description: Official theme for BARFI Institute — Building Aspirational and Resilient Futures for India. Warm amber sun palette with Yantra-inspired geometric art. Premium think-tank aesthetic.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
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: barfi-institute
Tags: blog, custom-menu, featured-images, translation-ready
*/

/* ─────────────────────────────────────────
   0. CUSTOM PROPERTIES — SUN / AMBER
───────────────────────────────────────── */
:root {
  /* Amber palette */
  --amber:        #D97706;
  --amber-bright: #F59E0B;
  --amber-dark:   #B45309;
  --amber-deep:   #92400E;
  --amber-light:  #FEF3C7;
  --amber-wash:   #FEF7EE;
  --amber-bg:     #FFFBF4;

  /* Dark footer */
  --footer-bg:    #1C1917;
  --footer-text:  #E7E5E4;
  --footer-muted: #78716C;
  --footer-dim:   #44403C;
  --footer-faint: #3C3836;

  /* Content */
  --dark:         #1C1917;
  --body-color:   #57534E;
  --muted:        #78716C;
  --light-muted:  #A8A29E;

  /* Borders (amber-tinted) */
  --border:       rgba(180, 83, 9, 0.10);
  --border-mid:   rgba(180, 83, 9, 0.18);
  --border-strong:rgba(180, 83, 9, 0.28);

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius: 3px;
}

/* ─────────────────────────────────────────
   1. RESET & BASE
───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0; padding: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--dark);
  background: var(--amber-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--amber-dark); }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.5rem; }

/* ─────────────────────────────────────────
   2. TYPOGRAPHY
───────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.25;
  color: var(--dark);
  margin: 0 0 1rem;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  background: var(--amber-bright);
  flex-shrink: 0;
}

/* ─────────────────────────────────────────
   3. SITE HEADER & NAV
   (No decorative band — clean hairline only)
───────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(180,83,9,0.06);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo-mark {
  width: 34px; height: 34px;
  border-radius: 4px;
  background: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.site-logo-text { line-height: 1.25; }

.logo-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dark);
}
.logo-name .barfi { color: var(--amber); }

.logo-tagline {
  font-size: 0.5375rem;
  color: var(--light-muted);
  letter-spacing: 0.02em;
  font-weight: 400;
  white-space: nowrap;
}

.site-nav-links-wrapper {
  display: flex;
  align-items: center;
}

.site-nav-menu {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav-menu li a {
  font-size: 0.8125rem;
  color: var(--body-color);
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  display: block;
  transition: color 0.15s;
}
.site-nav-menu li a:hover { color: var(--dark); }

.site-nav-menu li.current-menu-item > a,
.site-nav-menu li.current_page_item > a {
  color: var(--amber);
  font-weight: 500;
  border-bottom: 1.5px solid var(--amber);
  padding-bottom: calc(0.4rem - 1.5px);
}

.nav-cta {
  font-size: 0.75rem;
  font-weight: 500;
  color: #fff !important;
  background: var(--amber);
  padding: 0.45rem 1rem !important;
  border-radius: var(--radius);
  margin-left: 0.5rem;
  text-decoration: none !important;
  transition: background 0.15s;
  border-bottom: none !important;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--amber-dark) !important; color: #fff !important; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--dark);
  padding: 4px;
}

/* ─────────────────────────────────────────
   4. HERO
───────────────────────────────────────── */
.hero {
  background: var(--amber-bg);
  border-bottom: 2px solid var(--amber-bright);
  padding: 3.5rem 2rem 3rem;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 230px;
  gap: 3rem;
  align-items: center;
}

.hero-eyebrow { margin-bottom: 1rem; }

.hero h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.hero h1 em { font-style: normal; color: var(--amber); }

.hero-sub {
  font-size: 0.875rem;
  color: var(--body-color);
  line-height: 1.8;
  margin-bottom: 1.75rem;
  max-width: 400px;
}

.hero-buttons { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.btn-primary {
  font-size: 0.8125rem;
  color: #fff;
  background: var(--amber);
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 0.15s;
  display: inline-block;
}
.btn-primary:hover { background: var(--amber-dark); color: #fff; }

.btn-outline {
  font-size: 0.8125rem;
  color: var(--amber);
  border: 1.5px solid var(--amber);
  padding: 0.5rem 1.125rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.15s;
  display: inline-block;
}
.btn-outline:hover { background: var(--amber-light); color: var(--amber); }

.hero-yantra { display: flex; justify-content: center; align-items: center; }
.hero-yantra svg { width: 100%; max-width: 225px; }

/* ─────────────────────────────────────────
   5. THREE PILLARS
───────────────────────────────────────── */
.pillars {
  background: var(--amber-wash);
  border-bottom: 1px solid var(--border);
}

.pillars-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.pillar { padding: 1.75rem 2rem; }
.pillar + .pillar { border-left: 1px solid var(--border); }
.pillar-icon { margin-bottom: 0.65rem; }
.pillar-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--dark);
  margin-bottom: 0.3rem;
}
.pillar-text { font-size: 0.75rem; color: var(--muted); line-height: 1.65; }

/* ─────────────────────────────────────────
   6. SECTION HEADINGS
───────────────────────────────────────── */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.75rem 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
.section-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--dark);
  margin: 0;
}
.section-title em { font-style: italic; color: var(--amber); }
.section-link { font-size: 0.8125rem; color: var(--amber); font-weight: 500; }
.section-link:hover { color: var(--amber-dark); }

/* ─────────────────────────────────────────
   7. BLOG LISTING (idea-first — no dates)
───────────────────────────────────────── */
.blog-list {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 1.5rem;
}

.blog-item {
  display: flex;
  gap: 14px;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border);
  transition: transform 0.12s;
}
.blog-item:last-child { border-bottom: none; }
.blog-item:hover { transform: translateX(3px); }

.blog-node {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
  margin-top: 5px;
}
.blog-node.alt {
  background: none;
  border: 1.5px solid var(--amber);
}

.blog-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.tag {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 2px;
  background: var(--amber-light);
  color: var(--amber-deep);
}
.tag.primary {
  background: var(--amber);
  color: #fff;
}

.blog-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--dark);
  line-height: 1.4;
  margin-bottom: 0.35rem;
  text-decoration: none;
  display: block;
}
.blog-title:hover { color: var(--amber); }
.blog-excerpt { font-size: 0.8125rem; color: var(--body-color); line-height: 1.7; margin: 0; }

/* ─────────────────────────────────────────
   8. BLOG ARCHIVE PAGE
───────────────────────────────────────── */
.page-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 2.75rem 2rem 2.25rem;
}
.page-header-inner { max-width: 1200px; margin: 0 auto; }

.page-kicker {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.55rem;
}

.page-title { font-size: 1.875rem; margin-bottom: 0.4rem; }
.page-title em { color: var(--amber); font-style: italic; }
.page-subtitle { font-size: 0.8125rem; color: var(--muted); line-height: 1.7; max-width: 540px; }

.filter-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 2rem;
}
.filter-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.filter-label {
  font-size: 0.625rem;
  color: var(--light-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-right: 4px;
}
.filter-tag {
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border-mid);
  color: var(--body-color);
  background: transparent;
  text-decoration: none;
  transition: all 0.15s;
  display: inline-block;
}
.filter-tag:hover { border-color: var(--amber); color: var(--amber); }
.filter-tag.active { background: var(--amber); color: #fff; border-color: var(--amber); }

/* ─────────────────────────────────────────
   9. SINGLE POST
───────────────────────────────────────── */
.post-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 2.75rem 2rem 2.5rem;
}
.post-header-inner { max-width: 780px; margin: 0 auto; }

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 1.25rem;
  transition: color 0.15s;
}
.post-back:hover { color: var(--amber); }
.post-back::before { content: '←'; }

.post-title { font-size: 2rem; margin-bottom: 1rem; line-height: 1.2; }
.post-meta-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 0; }

.post-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 2.5rem 2rem 3.5rem;
}
.post-content p {
  font-size: 0.9375rem;
  color: var(--body-color);
  line-height: 1.9;
  margin-bottom: 1.5rem;
}
.post-content h2 { font-size: 1.5rem; margin: 2.5rem 0 1rem; }
.post-content h3 { font-size: 1.25rem; margin: 2rem 0 0.75rem; }
.post-content blockquote {
  border-left: 3px solid var(--amber);
  margin: 2rem 0;
  padding: 0.75rem 1.5rem;
  background: var(--amber-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--dark);
  font-style: italic;
}

.post-share {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.post-share-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--light-muted);
  margin-bottom: 0.75rem;
}
.post-share-links { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-mid);
  color: var(--body-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}
.share-btn:hover { border-color: var(--amber); color: var(--amber); }

/* ─────────────────────────────────────────
   10. ABOUT PAGE
───────────────────────────────────────── */
.about-hero {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 3rem 2rem;
}
.about-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3.5rem;
  align-items: start;
}
.about-left h1 { font-size: 1.75rem; margin-bottom: 1.25rem; line-height: 1.25; }
.about-left p { font-size: 0.875rem; color: var(--body-color); line-height: 1.85; }
.about-left strong { color: var(--dark); font-weight: 500; }
.about-right {
  background: var(--amber-wash);
  border-radius: 6px;
  border: 1px solid var(--border);
  padding: 1.75rem;
}
.about-values-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.about-value-num {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 3px;
}
.about-value-label { font-size: 0.6875rem; color: var(--muted); }
.about-focus-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber);
  font-weight: 600;
  margin-bottom: 0.6rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-mid);
}
.about-tags { display: flex; gap: 5px; flex-wrap: wrap; }

/* ─────────────────────────────────────────
   11. RESOURCES PAGE
───────────────────────────────────────── */
.resources-list {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem 3rem;
}
.resource-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.resource-item:last-child { border-bottom: none; }
.resource-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: var(--amber-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--amber);
  font-size: 1.125rem;
}
.resource-type {
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber);
  font-weight: 600;
  margin-bottom: 3px;
}
.resource-title { font-size: 0.9375rem; font-weight: 500; color: var(--dark); margin-bottom: 3px; }
.resource-desc { font-size: 0.8125rem; color: var(--body-color); line-height: 1.65; }

/* ─────────────────────────────────────────
   12. DARK FOOTER — multi-column, Pramana-inspired
   (No decorative band — just amber top border)
───────────────────────────────────────── */
.site-footer {
  background: var(--footer-bg);
  border-top: 2px solid var(--amber);
}

.footer-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.75rem 2rem 1.25rem;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.footer-brand {}
.footer-name { font-size: 0.9375rem; font-weight: 500; color: var(--footer-text); margin-bottom: 4px; }
.footer-name .barfi { color: var(--amber-bright); }
.footer-desc {
  font-size: 0.6875rem;
  color: var(--footer-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
  max-width: 220px;
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  color: var(--footer-muted);
  font-size: 1.0625rem;
  text-decoration: none;
  display: flex; align-items: center;
  transition: color 0.15s;
}
.footer-social a:hover { color: var(--amber-bright); }

.footer-col {}
.footer-col-title {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber-bright);
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.footer-col-links { display: flex; flex-direction: column; gap: 0.35rem; }
.footer-col-links a {
  font-size: 0.75rem;
  color: var(--footer-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-col-links a:hover { color: var(--footer-text); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-copy { font-size: 0.625rem; color: var(--footer-dim); }
.footer-full-form { font-size: 0.5625rem; color: var(--footer-faint); letter-spacing: 0.01em; }

/* ─────────────────────────────────────────
   13. GENERIC PAGE
───────────────────────────────────────── */
.generic-content {
  max-width: 780px;
  margin: 3rem auto;
  padding: 0 2rem;
}
.page-title-main {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.generic-content .wp-content p {
  font-size: 0.9375rem;
  color: var(--body-color);
  line-height: 1.85;
  margin-bottom: 1.25rem;
}

/* ─────────────────────────────────────────
   14. UTILITY
───────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.no-results { padding: 3rem 2rem; text-align: center; color: var(--muted); font-size: 0.9375rem; }
.pagination { display: flex; gap: 8px; padding: 1.5rem 2rem; max-width: 1200px; margin: 0 auto; }
.pagination a, .pagination span {
  font-size: 0.8125rem;
  color: var(--amber);
  padding: 4px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border-mid);
  text-decoration: none;
}
.pagination .current { background: var(--amber); color: #fff; border-color: var(--amber); }

/* ─────────────────────────────────────────
   15. RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-yantra { display: none; }
  .pillars-inner { grid-template-columns: 1fr; }
  .pillar + .pillar { border-left: none; border-top: 1px solid var(--border); }
  .about-hero-inner { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .site-nav { padding: 0.75rem 1.25rem; }
  .nav-toggle { display: block; }
  .site-nav-links-wrapper {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1rem;
    box-shadow: 0 4px 16px rgba(180,83,9,0.08);
  }
  .site-nav-links-wrapper.open { display: block; }
  .site-nav-menu { flex-direction: column; align-items: flex-start; }
  .site-nav-menu li a { padding: 0.55rem 0.5rem; }
  .hero { padding: 2.5rem 1.25rem 2rem; }
  .hero h1 { font-size: 1.625rem; }
  .section-head { flex-direction: column; gap: 0.5rem; padding: 1.25rem 1.25rem 0.75rem; }
  .blog-list { padding: 0 1.25rem 1rem; }
  .page-header { padding: 2rem 1.25rem; }
  .filter-bar { padding: 0.75rem 1.25rem; }
  .footer-main { grid-template-columns: 1fr; padding: 1.5rem 1.25rem 1rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; padding: 0.75rem 1.25rem; }
}

/* ─────────────────────────────────────────
   16. WORDPRESS BLOCKS
───────────────────────────────────────── */
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: 0.75rem; color: var(--muted); text-align: center; margin-top: 0.4rem; }
