/*
Theme Name: Ksarapani Healthcare
Theme URI: https://ksarapanihealthcare.in
Author: Ksarapani Healthcare
Description: Custom theme matching the Ksarapani Healthcare website design — dark, elegant, Ayurveda-focused.
Version: 1.0
License: Private
Text Domain: ksarapani
*/

/* =========================================
   DESIGN TOKENS — identical to main site
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,700;1,400;1,500&family=DM+Sans:wght@300;400;500&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --g50: #FAFAFA;
  --g100: #F5F5F5;
  --g200: #EEEEEE;
  --g300: #E0E0E0;
  --g400: #BDBDBD;
  --g500: #9E9E9E;
  --g600: #757575;
  --g700: #616161;
  --g800: #1f1f1f;
  --g900: #0f0f0f;
  --white: #FFFFFF;
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'DM Sans', sans-serif;
  --transition: all 0.35s ease;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 28px rgba(0, 0, 0, 0.22);
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--g900);
  color: var(--g100);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  padding-top: 72px;
}

a {
  color: var(--g400);
  text-decoration: none;
  transition: color 0.25s;
}

a:hover {
  color: var(--g100);
}

img {
  max-width: 1160px;
  height: auto;
  display: block;
  margin 0 auto
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: var(--g800);
}

::-webkit-scrollbar-thumb {
  background: var(--g600);
  border-radius: 3px;
}

/* =========================================
   UTILITY
   ========================================= */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 2rem;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--g600);
  display: block;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  font-weight: 400;
  color: var(--g100);
  line-height: 1.2;
}

.section-title em {
  font-style: italic;
  color: var(--g400);
}

.rule {
  width: 40px;
  height: 1.5px;
  background: var(--g700);
  margin: 1.25rem 0 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-dark {
  background: var(--g100);
  color: var(--g900);
}

.btn-dark:hover {
  background: var(--g300);
  color: var(--g900);
}

.btn-outline {
  background: transparent;
  color: var(--g400);
  border: 1.5px solid var(--g700);
}

.btn-outline:hover {
  border-color: var(--g300);
  background: var(--g800);
  color: var(--g100);
}

/* =========================================
   HEADER / NAV
   ========================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--g900);
  border-bottom: 1px solid var(--g800);
  padding: 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 0;
}

.logo-img {
  height: 48px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--g600);
  text-decoration: none;
  transition: color 0.25s;
}

.nav-link:hover,
.nav-link.current {
  color: var(--g200);
}

.btn-nav {
  background: var(--g50); color: var(--g900); font-weight: 700;
}

.btn-nav:hover {
  background: var(--g200); color: var(--g900);
}

@media (max-width: 768px) {

  /* Hamburger + mobile drawer handled in header.php inline styles */
  .nav-links {
    display: none !important;
  }
}

/* =========================================
   BLOG INDEX — HERO BANNER
   ========================================= */
.blog-hero {
  background: var(--g900);
  border-bottom: 1px solid var(--g800);
  padding: 5rem 0 4rem;
  text-align: center;
}

.blog-hero .eyebrow {
  color: var(--g600);
}

.blog-hero .section-title {
  color: var(--g100);
  max-width: 680px;
  margin: 0 auto;
}

.blog-hero .rule {
  margin: 1.25rem auto 0;
}

/* =========================================
   BLOG INDEX — POST GRID
   ========================================= */
.blog-section {
  background: var(--g900);
  padding: 4rem 0 6rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  background: var(--g800);
}

/* Card */
.post-card {
  background: var(--g900);
  display: flex;
  flex-direction: column;
  transition: background 0.3s;
  text-decoration: none;
}

.post-card:hover {
  background: var(--g800);
}

.post-card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--g800);
  position: relative;
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(80%) contrast(0.9);
  transition: transform 0.5s ease, filter 0.4s ease;
  display: block;
}

.post-card:hover .post-card-thumb img {
  transform: scale(1.05);
  filter: grayscale(30%) contrast(1);
}

/* Thumb placeholder when no image */
.post-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--g800) 0%, var(--g900) 100%);
}

.post-thumb-placeholder svg {
  width: 40px;
  height: 40px;
  color: var(--g700);
  opacity: 0.5;
}

.post-card-body {
  padding: 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--g800);
}

.post-cat {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--g600);
  margin-bottom: 0.6rem;
  display: block;
}

.post-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--g100);
  line-height: 1.35;
  margin-bottom: 0.75rem;
  transition: color 0.25s;
}

.post-card:hover .post-title {
  color: var(--g300);
}

.post-excerpt {
  font-size: 0.82rem;
  color: var(--g600);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  flex: 1;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--g700);
  border-top: 1px solid var(--g800);
  padding-top: 1rem;
  margin-top: auto;
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.post-meta svg {
  width: 11px;
  height: 11px;
}

.post-meta-sep {
  color: var(--g800);
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--g500);
  transition: color 0.25s;
}

.read-more svg {
  width: 12px;
  height: 12px;
  transition: transform 0.25s;
}

.post-card:hover .read-more {
  color: var(--g300);
}

.post-card:hover .read-more svg {
  transform: translateX(4px);
}

/* Featured post (first) — full width, horizontal layout */
.post-card.featured {
  grid-column: 1 / -1;
  flex-direction: row;
  background: var(--g800);
}

.post-card.featured .post-card-thumb {
  width: 50%;
  aspect-ratio: unset;
  min-height: 320px;
  flex-shrink: 0;
}

.post-card.featured .post-card-body {
  border-top: none;
  border-left: 1px solid var(--g700);
  padding: 2.5rem 3rem;
  justify-content: center;
}

.post-card.featured .post-title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  margin-bottom: 1rem;
}

.post-card.featured .post-excerpt {
  font-size: 0.88rem;
}

.post-card.featured .post-cat::before {
  content: 'Featured · ';
}

/* No posts found */
.no-posts {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--g600);
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
}

/* Pagination */
.blog-pagination {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.blog-pagination a,
.blog-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--g800);
  background: transparent;
  font-size: 0.78rem;
  color: var(--g600);
  text-decoration: none;
  transition: border-color 0.25s, color 0.25s;
}

.blog-pagination a:hover {
  border-color: var(--g500);
  color: var(--g200);
}

.blog-pagination .current {
  border-color: var(--g500);
  color: var(--g200);
  background: var(--g800);
}

/* =========================================
   SINGLE POST
   ========================================= */
.post-hero {
  background: var(--g900);
  border-bottom: 1px solid var(--g800);
  padding: 4rem 0 0;
}

.post-hero-inner {
  /* no longer used — container wraps directly */
}

.post-hero-cats {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.post-hero-cat {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--g600);
  border: 1px solid var(--g700);
  padding: 0.2rem 0.65rem;
}

.post-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 400;
  color: var(--g100);
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.post-hero-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--g600);
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--g800);
  margin-bottom: 0;
}

.post-hero-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.post-hero-meta svg {
  width: 12px;
  height: 12px;
}

.post-featured-image {
  max-height: 480px;
  overflow: hidden;
  margin-top: 2rem;
  width: 100%;
}

.post-featured-image img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  object-position: center center;
  filter: grayscale(60%) contrast(0.9);
  display: block;
}

/* Article body */
.post-article {
  background: var(--g900);
  padding: 4rem 0 6rem;
}

.post-content {
  /* fills .container width — no extra max-width needed */
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* ── Gutenberg / block-editor padding resets ── */
/* WordPress injects padding-left via global-styles & block-library CSS.
   These overrides ensure post content aligns with the rest of the page. */
.post-content>*,
.post-content .wp-block,
.post-content .wp-block-group,
.post-content .wp-block-paragraph,
.post-content .wp-block-post-content,
.post-content .is-layout-constrained,
.post-content .is-layout-constrained>*,
.post-content .wp-block-group__inner-container {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: none !important;
}

.post-content p {
  font-size: 1rem;
  color: var(--g400);
  line-height: 1.9;
  margin-bottom: 1.5rem;
}

.post-content h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 400;
  color: var(--g100);
  line-height: 1.25;
  margin: 2.5rem 0 1rem;
}

.post-content h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--g200);
  margin: 2rem 0 0.75rem;
}

.post-content h4 {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--g500);
  margin: 1.5rem 0 0.5rem;
}

.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.post-content li {
  font-size: 1rem;
  color: var(--g400);
  line-height: 1.8;
  margin-bottom: 0.4rem;
}

.post-content a {
  color: var(--g300);
  text-decoration: underline;
  text-decoration-color: var(--g700);
}

.post-content a:hover {
  color: var(--g100);
}

.post-content strong {
  color: var(--g200);
  font-weight: 500;
}

.post-content em {
  font-style: italic;
  color: var(--g400);
}

.post-content blockquote {
  border-left: 3px solid var(--g700);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--g800);
}

.post-content blockquote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--g300);
  margin-bottom: 0;
}

.post-content img {
  width: 100%;
  border: 1px solid var(--g800);
  margin: 1.5rem 0;
  filter: grayscale(40%) contrast(0.9);
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--g800);
  margin: 2.5rem 0;
}

/* Post footer — tags + share */
.post-footer {
  padding: 2rem 0 0;
  border-top: 1px solid var(--g800);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.post-tag {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--g600);
  border: 1px solid var(--g800);
  padding: 0.25rem 0.75rem;
  text-decoration: none;
  transition: border-color 0.25s, color 0.25s;
}

.post-tag:hover {
  border-color: var(--g600);
  color: var(--g300);
}

/* Author box */
.author-box {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem 0;
  border-top: 1px solid var(--g700);
  border-bottom: 1px solid var(--g700);
  margin: 2.5rem 0 4rem;
}

.author-favicon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--g700);
  border: 1px solid var(--g600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--g300);
  flex-shrink: 0;
}

.author-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.author-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--g200);
  margin-bottom: 0.2rem;
}

.author-role {
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--g600);
  margin-bottom: 0.5rem;
}

.author-bio {
  font-size: 0.82rem;
  color: var(--g600);
  line-height: 1.7;
  margin: 0;
}

/* Related posts */
.related-posts {
  background: var(--g800);
  border-top: 1px solid var(--g700);
  padding: 4rem 0;
}

.related-posts .container {}

.related-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--g200);
  margin-bottom: 0.5rem;
}

.related-rule {
  width: 32px;
  height: 1px;
  background: var(--g700);
  margin: 0.75rem 0 2rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  background: var(--g700);
}

.related-card {
  background: var(--g800);
  padding: 1.5rem;
  text-decoration: none;
  display: block;
  transition: background 0.25s;
}

.related-card:hover {
  background: var(--g700);
}

.related-card-cat {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--g600);
  margin-bottom: 0.5rem;
  display: block;
}

.related-card-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--g200);
  line-height: 1.4;
}

/* Back to blog */
.back-to-blog {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 !important;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--g600);
  text-decoration: none;
  transition: color 0.25s;
  padding: 2rem 0 0;
}

.back-to-blog svg {
  width: 14px;
  height: 14px;
}

.back-to-blog:hover {
  color: var(--g300);
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background: var(--g900);
  border-top: 1px solid var(--g800);
  padding: 4.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--g800);
  margin-bottom: 1.5rem;
}

.footer-logo-link {
  margin-bottom: 1rem;
  display: inline-flex;
}

.logo-img--footer {
  height: 54px;
  width: auto;
}

.footer-desc {
  font-size: 0.82rem;
  color: var(--g600);
  line-height: 1.8;
  margin: 1.25rem 0;
}

.social-row {
  display: flex;
  gap: 0.6rem;
}

.social-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--g700);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--g600);
  text-decoration: none;
  transition: var(--transition);
}

.social-btn:hover {
  border-color: var(--g400);
  color: var(--g300);
}

.social-btn svg {
  width: 15px;
  height: 15px;
}

.footer-col-title {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--g500);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-links a {
  font-size: 0.84rem;
  color: var(--g600);
  text-decoration: none;
  transition: color 0.25s;
}

.footer-links a:hover {
  color: var(--g300);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: var(--g700);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-bottom a {
  color: var(--g600);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--g400);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .posts-grid {
    grid-template-columns: 1fr 1fr;
  }

  .post-card.featured {
    flex-direction: column;
  }

  .post-card.featured .post-card-thumb {
    width: 100%;
    min-height: 240px;
  }

  .post-card.featured .post-card-body {
    border-left: none;
    border-top: 1px solid var(--g700);
  }

  .related-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }

  .post-card.featured .post-card-body {
    padding: 1.75rem;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .container {
    padding: 0 1.25rem;
  }
}