/*
Theme Name: eCompliance Blog
Theme URI: https://ecompliance.in/blog/
Description: Marketing blog theme aligned with ecompliance.in.
Author: ecompliance.in
Version: 1.3.3
Text Domain: ecompliance-blog
*/

@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap");

:root {
  --paper: #f3f5f0;
  --ink: #0c2a1e;
  --nav: #3d5448;
  --muted: #4b6256;
  --muted-light: #6b8175;
  --line: rgba(12, 42, 30, 0.08);
  --green: #0e8a45;
  --green-accent: #12a150;
  --mint: #3ddc84;
  --card: #ffffff;
  --forest: #0c2a1e;
  --shell: 1240px;
  --sidebar-w: 300px;
  --layout-gap: 32px;
  --pad-x: 24px;
  --radius: 18px;
  --sans: "Geist", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.ec-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

.ec-serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--green-accent);
}

::selection {
  background: #bfe8cf;
  color: var(--ink);
}

/* Header — matches landing */
.ec-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 245, 240, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.ec-site-header__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 10px var(--pad-x);
  min-height: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 20px;
}

.ec-brand {
  justify-self: start;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.ec-nav {
  justify-self: center;
  align-self: center;
}

.ec-header-cta {
  justify-self: end;
  align-self: center;
  line-height: 1.2;
}

.ec-brand:hover {
  color: var(--ink);
  opacity: 0.92;
}

.ec-brand__logo {
  display: block;
  border-radius: 8px;
}

.ec-brand__tld {
  color: var(--muted-light);
  font-weight: 400;
}

.ec-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 22px;
  font-size: 14.5px;
  line-height: 1.2;
  white-space: nowrap;
}

.ec-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--nav);
  transition: color 0.15s ease;
}

.ec-nav a:hover {
  color: var(--green);
}

.ec-nav a.is-active {
  color: var(--green);
  font-weight: 600;
}

.ec-header-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 11px;
  font-size: 14.5px;
  font-weight: 600;
  color: #fff !important;
  background: var(--forest);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 6px 14px -8px rgba(12, 42, 30, 0.8);
  transition: background 0.15s ease;
}

.ec-header-cta:hover {
  background: #0e3d2a;
  color: #fff;
}

/* Shell + layout — one column grid for hero + posts */
.ec-main {
  flex: 1;
  padding-bottom: 64px;
}

.ec-shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.ec-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-w);
  gap: var(--layout-gap);
  align-items: start;
}

.ec-layout__feed {
  min-width: 0;
}

/* Hero — inside feed column (aligns with cards) */
.ec-hero {
  position: relative;
  padding: 44px 0 0;
  overflow: hidden;
}

.ec-hero__dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(12, 42, 30, 0.13) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 65% 55% at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 65% 55% at 50% 30%, #000 20%, transparent 75%);
}

.ec-hero__glow {
  position: absolute;
  left: 50%;
  top: -180px;
  width: 900px;
  height: 500px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(31, 191, 102, 0.14), transparent 65%);
  pointer-events: none;
}

.ec-hero__copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.ec-eyebrow {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}

.ec-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.5rem, 5.5vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.ec-hero__lead {
  margin: 0;
  max-width: 36rem;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--muted);
}

.ec-hero__count {
  margin: 20px 0 0;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--muted-light);
  font-weight: 500;
}

.ec-hero__count strong {
  color: var(--ink);
  font-weight: 650;
}

/* Cards */
.ec-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.ec-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 36px -28px rgba(12, 42, 30, 0.18);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.ec-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px -28px rgba(12, 42, 30, 0.28);
}

.ec-card--featured {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
}

.ec-card--featured .ec-card__media {
  min-height: 260px;
}

.ec-card--editorial {
  grid-template-columns: 1fr;
  box-shadow:
    inset 4px 0 0 var(--green-accent),
    0 10px 36px -28px rgba(12, 42, 30, 0.18);
}

.ec-card--editorial:hover {
  box-shadow:
    inset 4px 0 0 var(--green-accent),
    0 20px 48px -28px rgba(12, 42, 30, 0.28);
}

.ec-card--editorial .ec-card__body {
  padding: 28px 32px 30px 36px;
}

.ec-card__editorial-mark {
  margin: 0 0 16px;
}

.ec-card__editorial-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}

.ec-card__media {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e8ece6;
}

.ec-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 160px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.ec-card--featured .ec-card__media img {
  min-height: 260px;
}

.ec-card:hover .ec-card__media img {
  transform: scale(1.03);
}

.ec-card__placeholder {
  display: grid;
  place-items: center;
  min-height: 160px;
  height: 100%;
  background:
    radial-gradient(circle at 30% 20%, rgba(61, 220, 132, 0.12), transparent 45%),
    linear-gradient(160deg, #eef2eb, #dfe8e0);
}

.ec-card__placeholder-logo {
  opacity: 0.85;
  filter: drop-shadow(0 8px 16px rgba(12, 42, 30, 0.12));
}

.ec-card__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.12) 50%, transparent 58%);
  opacity: 0;
  transition: opacity 0.3s;
}

.ec-card:hover .ec-card__shine {
  opacity: 1;
}

.ec-card__body {
  display: flex;
  flex-direction: column;
  padding: 22px 26px 24px;
}

.ec-card--featured .ec-card__body {
  padding: 28px 32px 30px;
  justify-content: center;
}

.ec-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 10px;
}

.ec-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(14, 138, 69, 0.08);
}

.ec-card__meta {
  font-size: 12.5px;
  color: var(--muted-light);
  font-weight: 500;
}

.ec-card__title {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.28;
}

.ec-card--featured .ec-card__title {
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  margin-bottom: 12px;
}

.ec-card__title a:hover {
  color: var(--green);
}

.ec-card__excerpt {
  margin: 0 0 14px;
  flex: 1;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.52;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ec-card--featured .ec-card__excerpt {
  -webkit-line-clamp: 4;
  font-size: 15.5px;
}

.ec-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
  margin-top: auto;
  padding-top: 4px;
}

.ec-card__link span {
  transition: transform 0.2s ease;
}

.ec-card:hover .ec-card__link span {
  transform: translateX(3px);
}

/* Sidebar */
.ec-sidebar {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: var(--sidebar-w);
  justify-self: end;
  padding-top: 44px;
}

.ec-sidebar__panel {
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px -24px rgba(12, 42, 30, 0.2);
}

.ec-sidebar__panel h2 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.ec-topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ec-topic-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.4;
}

.ec-topic-list__dot {
  width: 6px;
  height: 6px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--mint);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.25);
}

.ec-sidebar__panel--dark {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--forest);
  border-color: rgba(255, 255, 255, 0.06);
  color: #eaf5ee;
}

.ec-sidebar__panel--dark h2 {
  color: #fff;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.ec-sidebar__eyebrow {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5ee39a;
}

.ec-sidebar__panel--dark p {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #9fb9aa;
}

.ec-sidebar__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 18px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: var(--forest) !important;
  background: #fff;
  box-sizing: border-box;
}

.ec-sidebar__btn:hover {
  background: #f0f7f2;
}

.ec-sidebar__btn--light {
  background: var(--forest);
  color: #fff !important;
}

.ec-sidebar__panel--plain {
  padding: 18px 22px;
  background: transparent;
  border-style: dashed;
  box-shadow: none;
}

.ec-sidebar__panel--plain h2 {
  margin-bottom: 10px;
}

.ec-sidebar__legal {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted-light);
}

/* Article */
.ec-article-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 36px 24px 72px;
}

.ec-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--muted-light);
  margin-bottom: 24px;
}

.ec-breadcrumb a:hover {
  color: var(--green);
}

.ec-article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  padding: 32px 28px 40px;
  box-shadow: 0 12px 40px -28px rgba(12, 42, 30, 0.15);
}

.ec-article__head .ec-pill {
  margin-bottom: 14px;
}

.ec-article h1 {
  margin: 0 0 14px;
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.ec-article__meta {
  font-size: 13.5px;
  color: var(--muted-light);
}

.ec-article__hero {
  margin: 24px 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.ec-article__hero img {
  display: block;
  width: 100%;
  height: auto;
}

.ec-prose {
  font-size: 1.05rem;
  line-height: 1.65;
}

.ec-prose p {
  margin: 0 0 1.1em;
}

.ec-prose h2,
.ec-prose h3 {
  margin: 1.6em 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.ec-prose a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ec-prose blockquote {
  margin: 1.2em 0;
  padding: 14px 18px;
  border-left: 3px solid var(--mint);
  background: rgba(14, 138, 69, 0.05);
  border-radius: 0 12px 12px 0;
  color: var(--muted);
}

.ec-article__back {
  margin-top: 24px;
}

.ec-article__back a {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.ec-article__back a:hover {
  color: var(--green);
}

/* CTA + footer */
.ec-cta-band {
  margin-top: auto;
  background: var(--forest);
  color: #eaf5ee;
  padding: 44px 24px;
  position: relative;
  overflow: hidden;
}

.ec-cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 70% at 10% 0%, rgba(61, 220, 132, 0.18), transparent 55%);
}

.ec-cta-band__inner {
  position: relative;
  max-width: var(--shell);
  padding: 0 var(--pad-x);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.ec-cta-band__eyebrow {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5ee39a;
}

.ec-cta-band h2 {
  margin: 0 0 8px;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  max-width: 20rem;
}

.ec-cta-band p {
  margin: 0;
  font-size: 14px;
  color: #9fb9aa;
  max-width: 26rem;
}

.ec-cta-band__btn {
  padding: 12px 22px;
  border-radius: 11px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--forest) !important;
  background: #fff;
}

.ec-site-footer {
  background: #071910;
  color: #9fb9aa;
  padding: 36px 24px 44px;
  font-size: 14px;
}

.ec-site-footer__inner {
  max-width: var(--shell);
  padding: 0 var(--pad-x);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px;
}

.ec-brand--footer {
  color: #eaf5ee;
  margin-bottom: 10px;
}

.ec-site-footer__brand p {
  margin: 0;
  max-width: 300px;
  line-height: 1.5;
}

.ec-site-footer__copy {
  margin-top: 14px !important;
  font-size: 13px;
}

.ec-site-footer__cols {
  display: flex;
  gap: 40px;
}

.ec-site-footer__cols h3 {
  margin: 0 0 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6f8f7e;
}

.ec-site-footer__cols div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ec-site-footer__cols a:hover {
  color: #5ee39a;
}

.ec-pagination {
  margin-top: 36px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ec-pagination a,
.ec-pagination span {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 13px;
  font-weight: 600;
}

.ec-pagination span.current {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
}

.ec-empty {
  text-align: center;
  padding: 48px 24px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

/* Logged-in WP admin bar spacing */
body.admin-bar .ec-site-header {
  top: 32px;
}

@media (max-width: 960px) {
  .ec-site-header__inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand cta"
      "nav nav";
    row-gap: 12px;
  }

  .ec-brand {
    grid-area: brand;
  }

  .ec-nav {
    grid-area: nav;
    justify-self: stretch;
    justify-content: center;
    flex-wrap: wrap;
  }

  .ec-header-cta {
    grid-area: cta;
  }

  .ec-layout {
    grid-template-columns: 1fr;
  }

  .ec-sidebar {
    position: static;
    order: -1;
    width: 100%;
    justify-self: stretch;
  }

  .ec-card,
  .ec-card--featured {
    grid-template-columns: 1fr;
  }

  .ec-card__media {
    max-height: 200px;
  }

  .ec-header-cta {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .ec-nav {
    gap: 14px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ec-card,
  .ec-card__media img {
    transition: none;
  }
}
