/* Purnartha Blog — shared stylesheet
   Theme: www.purnartha.com homepage (light variant) — Poppins, orange accents, dark footer
   Compliance: WCAG 2.1 Level AA per Accessibility Audit dated 29 July 2026
   - Text orange uses #C2410C (≈5:1 on white) instead of #ff7a00 (2.6:1 — audit SC 1.4.3 finding)
   - Visible focus indicators (SC 2.4.7), skip link (SC 2.4.1), keyboard menus (SC 2.1.1)
   - Links underlined in content so colour is not the only cue (SC 1.4.1)
*/
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --orange: #FF7A00;        /* brand orange — decorative use only (fails text contrast) */
  --accent: #C2410C;        /* accessible orange for text, links, buttons (≈5:1 on white) */
  --accent-dark: #9A3412;   /* hover / badge text */
  --dark: #212529;          /* primary text, matches purnartha.com headlines */
  --heading: #1A1A1A;
  --muted: #565E6C;         /* ≥6:1 on white */
  --border: #E5E7EB;
  --bg: #FFFFFF;
  --bg-soft: #FBF6F1;       /* warm off-white like purnartha.com hero */
  --badge-bg: #FFF1E6;
  --badge-border: #F5CBA8;
  --footer-bg: #f3f3f3;     /* purnartha.com homepage footer */
  --footer-text: #282828;
  --footer-head: #9a3412;
}

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

body {
  font-family: "Poppins", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--dark);
  background: var(--bg);
  line-height: 1.7;
}

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

img { max-width: 100%; height: auto; }

.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* Visible focus indicator — SC 2.4.7 */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.site-footer a:focus-visible { outline-color: #FFFFFF; }

/* Screen-reader-only text */
.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;
}

/* Skip link — SC 2.4.1 (first Tab stop, visible on focus) */
.skip-link {
  position: absolute;
  left: 8px; top: -48px;
  z-index: 200;
  background: var(--dark);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 6px 6px;
  font-weight: 700;
  text-decoration: none;
  transition: top .15s ease-in;
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------- Header (purnartha.com nav structure, light variant) ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 20px;
  max-width: 1400px;
  margin: 0 auto;
}
.logo img { height: 56px; width: auto; display: block; }

.main-nav ul { list-style: none; display: flex; gap: 26px; align-items: center; }
.main-nav > ul > li { position: relative; }
.main-nav a, .main-nav .drop-toggle {
  font-weight: 500;
  font-size: 15px;
  color: #444444;
  padding: 10px 0;
  display: inline-block;
  text-decoration: none;
}
.main-nav .drop-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  line-height: inherit;
}
.main-nav .drop-toggle::after { content: " \25BE"; font-size: 11px; color: var(--accent); }
.main-nav a:hover, .main-nav .drop-toggle:hover { color: var(--accent); }

/* Dropdowns — open on hover, keyboard focus (SC 2.1.1) or button toggle */
.main-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 250px;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 8px 0;
  flex-direction: column;
  gap: 0;
}
.main-nav li.has-sub:hover .sub-menu,
.main-nav li.has-sub:focus-within .sub-menu,
.main-nav li.has-sub .drop-toggle[aria-expanded="true"] ~ .sub-menu { display: flex; }
.main-nav .sub-menu li { width: 100%; }
.main-nav .sub-menu a {
  display: block;
  padding: 9px 18px;
  font-weight: 500;
  font-size: 14px;
  width: 100%;
}
.main-nav .sub-menu a:hover { background: var(--bg-soft); }

.btn-signin {
  background: var(--accent);   /* accessible orange, white text ≈5:1 */
  color: #fff;
  padding: 9px 26px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .3px;
  white-space: nowrap;
  text-decoration: none;
}
.btn-signin:hover { background: var(--accent-dark); color: #fff; }

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--dark);
  border-radius: 6px;
  padding: 2px 10px;
  font-size: 24px;
  color: var(--dark);
  cursor: pointer;
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 10px 20px; align-items: flex-start; }
  .main-nav .sub-menu { position: static; display: flex; border: none; box-shadow: none; padding-left: 16px; }
  .btn-signin { display: none; }
}

/* ---------- Blog listing (master page) — clean minimal 3-column grid ---------- */
.page-head {
  text-align: center;
  padding: 54px 20px 10px;
}
.page-head h1 {
  font-size: 34px;
  font-weight: 700;
  color: var(--heading);
}
.page-head h1 .accent { color: var(--accent); }
.page-head p {
  color: var(--muted);
  max-width: 640px;
  margin: 10px auto 0;
  font-size: 16px;
}

.post-grid {
  padding: 40px 0 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
@media (max-width: 992px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .post-grid { grid-template-columns: 1fr; } }

.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  transition: transform .18s ease, box-shadow .18s ease;
}
.post-card:hover,
.post-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(0,0,0,.10);
}
.post-card .thumb { display: block; }
.post-card .thumb img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
}
.post-card .card-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.cat-badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--badge-bg);
  color: var(--accent-dark);
  border: 1px solid var(--badge-border);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.post-card h2 {
  font-size: 18.5px;
  line-height: 1.42;
  margin-bottom: 10px;
  font-weight: 600;
}
.post-card h2 a { color: var(--heading); text-decoration: none; }
.post-card h2 a:hover, .post-card h2 a:focus-visible { color: var(--accent); text-decoration: underline; }
.post-card .excerpt {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card .post-meta { margin-top: auto; }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}
.post-meta .author-name { font-weight: 600; color: var(--muted); }

/* ---------- Single post ---------- */
.post-hero {
  background: linear-gradient(180deg, #FFF4EA 0%, #FBF6F1 60%, #FFFFFF 100%);
  color: var(--dark);
  padding: 46px 0 40px;
  border-bottom: 1px solid var(--border);
}
.post-hero h1 { font-size: 34px; line-height: 1.3; max-width: 900px; color: var(--heading); }
.post-hero .subtitle { color: #3C434D; margin-top: 12px; max-width: 820px; font-size: 17px; }
.post-hero .post-meta { margin-top: 18px; color: #4A515C; }
.post-hero .post-meta .author-name { color: #4A515C; }
@media (max-width: 760px) { .post-hero h1 { font-size: 26px; } }

.post-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 20px 30px;
  font-size: 16.5px;
}
/* Content links underlined — colour is not the only cue (SC 1.4.1) */
.post-content a { text-decoration: underline; }
.post-content .featured-img {
  border-radius: 10px;
  margin: 0 0 34px;
  display: block;
  width: 100%;
}
.post-content h2 { color: var(--heading); font-size: 27px; margin: 40px 0 14px; line-height: 1.3; border-left: 4px solid var(--orange); padding-left: 14px; }
.post-content h3 { color: var(--heading); font-size: 21px; margin: 30px 0 12px; }
.post-content h4 { color: var(--heading); font-size: 17.5px; margin: 24px 0 10px; }
.post-content p { margin-bottom: 16px; }
.post-content ul, .post-content ol { margin: 0 0 18px 26px; }
.post-content li { margin-bottom: 7px; }
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.post-content strong { color: var(--heading); }

.key-takeaways {
  background: var(--badge-bg);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 22px 26px;
  margin: 26px 0;
}
.key-takeaways h2 { margin-top: 0; border-left: none; padding-left: 0; }

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0 28px;
  font-size: 14.5px;
  overflow-x: auto;
  display: block;
}
.post-content table thead th, .post-content table th {
  background: var(--dark);        /* white on #212529 ≈ 16:1 */
  color: #fff;
  text-align: left;
  padding: 10px 14px;
  border: 1px solid #000;
}
.post-content table td {
  padding: 9px 14px;
  border: 1px solid #C9CDD3;      /* ≥3:1 boundary — SC 1.4.11 */
  vertical-align: top;
}
.post-content table tr:nth-child(even) td { background: var(--bg-soft); }

.source-note { font-size: 13.5px; color: var(--muted); font-style: italic; }

.article-disclaimer {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 22px;
  font-size: 13.5px;
  color: #3C434D;
  margin-top: 36px;
}

/* ---------- Footer — purnartha.com homepage structure ---------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  margin-top: 60px;
  padding: 50px 0 22px;
  font-size: 13.5px;
  line-height: 1.8;
}
.site-footer a { color: #282828; text-decoration: none; }
.site-footer a:hover { color: #FFB877; text-decoration: underline; }

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr;
  gap: 34px;
  padding-bottom: 34px;
}
@media (max-width: 992px) { .footer-top { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .footer-top { grid-template-columns: 1fr; } }

.footer-brand .footer-logo { height: 74px; width: auto; margin-bottom: 18px; }
.social-links { display: flex; gap: 10px; list-style: none; flex-wrap: wrap; }
.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}
.social-links a:hover { background: var(--orange); color: #fff; text-decoration: none; }
.social-links svg { width: 17px; height: 17px; fill: currentColor; }

.footer-col h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--footer-head);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 16px; }

.footer-legal {
  border-top: 1px solid rgba(255,255,255,.22);
  padding-top: 22px;
  border-top: solid 1px;
}
.footer-legal p { margin-bottom: 14px; font-size: 12.5px; color: var(--footer-text); }
.footer-legal a { text-decoration: underline; font-weight: 600; }

.copyright {
  border-top: 1px solid rgba(255,255,255,.22);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  background-color: black;
  padding: 20px;
}
.copyright a { text-decoration: none; color: #f3f3f3;}
.copyright a:hover { text-decoration: underline; }
