/* ============================================================
   Shikar | শিকড় মানব কল্যাণ ফাউন্ডেশন — revamped theme
   ============================================================ */

:root {
  --green: #2f6a4d;
  --green-dark: #234f3a;
  --green-darker: #1b3d2c;
  --cream: #f5efe2;
  --cream-soft: #faf6ee;
  --sky: #e2f1ff;
  --sky-soft: #eef6ff;
  --orange: #ec6a2c;
  --purple: #9b6fc4;
  --ink: #20302a;
  --muted: #5b6b63;
  --line: rgba(0, 0, 0, 0.08);
  --shadow: 0 18px 50px -20px rgba(27, 61, 44, 0.35);
  --radius: 18px;
  --header-h: 92px;
  --serif: "Playfair Display", Georgia, serif;
  --bn: "Hind Siliguri", "Noto Sans Bengali", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--bn);
  color: var(--ink);
  background: var(--cream-soft);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; transition: color .2s; }
a:hover { color: var(--orange); }

.container {
  width: min(1180px, 92%);
  margin-inline: auto;
}

.serif { font-family: var(--serif); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--sky);
  border-bottom: 1px solid rgba(47, 106, 77, 0.12);
  transition: box-shadow .3s, background .3s;
}
.site-header.scrolled {
  box-shadow: 0 10px 30px -18px rgba(27, 61, 44, 0.4);
  background: rgba(226, 241, 255, 0.92);
  backdrop-filter: blur(8px);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand { display: flex; align-items: center; }
.brand img { height: 52px; width: auto; }

.nav-desktop ul {
  display: flex;
  gap: 1.7rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-desktop a {
  color: var(--green-dark);
  font-weight: 500;
  font-size: 1.02rem;
  position: relative;
  padding: 4px 0;
}
.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--orange);
  transition: width .25s ease;
}
.nav-desktop a:hover::after,
.nav-desktop a.active::after { width: 100%; }
.nav-desktop a.active { color: var(--green); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: .55rem;
  background: var(--green);
  color: #fff;
  border: none;
  padding: .6rem 1rem;
  border-radius: 10px;
  font-family: var(--bn);
  font-size: .95rem;
  cursor: pointer;
}
.menu-toggle span {
  width: 20px; height: 2px; background: #fff; position: relative; display: block;
}
.menu-toggle span::before,
.menu-toggle span::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: #fff;
}
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }

/* ---------- Slide-out mobile drawer ---------- */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(20, 40, 30, 0.5);
  opacity: 0; visibility: hidden;
  transition: opacity .3s;
  z-index: 60;
}
.drawer-backdrop.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0;
  width: min(340px, 86%); height: 100%;
  background: var(--green-dark);
  color: var(--cream);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  z-index: 61;
  padding: 2.2rem 1.9rem;
  overflow-y: auto;
}
.drawer.open { transform: translateX(0); }
.drawer-close {
  background: none; border: none; color: var(--cream);
  font-size: 2rem; cursor: pointer; line-height: 1; margin-bottom: 1rem;
}
.drawer h3 { font-family: var(--serif); font-size: 2rem; margin: .2rem 0 1.6rem; }
.drawer nav ul { list-style: none; margin: 0 0 2rem; padding: 0; }
.drawer nav a {
  display: block; color: var(--cream); font-size: 1.12rem;
  padding: .7rem 0; border-bottom: 1px solid rgba(255,255,255,.12);
}
.drawer nav a:hover, .drawer nav a.active { color: #fff; padding-left: 8px; }
.drawer-meta { font-size: .95rem; line-height: 1.7; color: rgba(245,239,226,.85); }
.drawer-meta u { display: inline-block; margin-top: .8rem; }
.drawer-social { display: flex; gap: 1.1rem; margin-top: 1.4rem; font-size: 1.2rem; }
.drawer-social a { color: rgba(245,239,226,.7); }
.drawer-social a:hover { color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(120% 90% at 70% 10%, rgba(255,255,255,.10), transparent 60%),
    linear-gradient(160deg, var(--green) 0%, var(--green-darker) 100%);
  color: var(--cream);
  text-align: center;
  padding: clamp(5rem, 14vh, 9rem) 0 clamp(5.5rem, 15vh, 10rem);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 5v50M5 30h50' stroke='%23ffffff' stroke-opacity='0.03' stroke-width='1'/%3E%3C/svg%3E");
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero .eyebrow {
  letter-spacing: .35em; text-transform: uppercase; font-size: .8rem;
  color: rgba(245,239,226,.7); margin-bottom: 1.4rem;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 6.5vw, 5.2rem);
  line-height: 1.08;
  margin: 0 auto 1.6rem;
  max-width: 14ch;
}
.hero p.lead {
  max-width: 60ch; margin: 0 auto 2.4rem;
  color: rgba(245,239,226,.9); font-size: 1.12rem;
}
.hero-scroll {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border: 1px solid rgba(245,239,226,.4);
  border-radius: 50%; color: var(--cream); margin-top: .5rem;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(8px);} }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.7rem; border-radius: 999px;
  font-family: var(--bn); font-size: 1rem; font-weight: 500;
  cursor: pointer; border: 2px solid transparent; transition: all .25s;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: #d65a1f; color: #fff; transform: translateY(-2px); }
.btn-ghost { border-color: rgba(245,239,226,.5); color: var(--cream); }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); color: #fff; transform: translateY(-2px); }

/* ---------- Sections ---------- */
section { padding: clamp(3.5rem, 8vh, 6rem) 0; }
.section-tint { background: var(--sky-soft); }
.section-head { margin-bottom: 2.6rem; }
.section-head .kicker {
  color: var(--orange); font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; font-size: .85rem; margin-bottom: .6rem;
}
.section-head h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.2; margin: 0;
  color: var(--green-darker);
}
.section-head.center { text-align: center; }
.section-head .underline {
  height: 6px; width: 84px; background: var(--orange); border-radius: 4px;
  margin-top: 1rem;
}
.section-head.center .underline { margin-inline: auto; }

.lead-text { color: var(--muted); font-size: 1.08rem; }

/* ---------- Split (image + text) ---------- */
.split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.split.reverse .split-media { order: 2; }
.split-media img {
  width: 100%; height: 100%; max-height: 520px; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.split-media {
  border-radius: var(--radius);
  background: linear-gradient(150deg, var(--sky), #fff);
  min-height: 320px; overflow: hidden;
}
.media-emblem {
  display: flex; align-items: center; justify-content: center;
  min-height: 360px; box-shadow: var(--shadow);
  position: relative;
}
.media-emblem::before {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='20' cy='20' r='1.5' fill='%23ffffff' fill-opacity='0.10'/%3E%3C/svg%3E");
}
.media-emblem img { width: min(58%, 280px); position: relative; z-index: 1; }
.media-emblem.dark {
  background: linear-gradient(150deg, var(--green) 0%, var(--green-darker) 100%);
}
.media-emblem.dark img { filter: brightness(0) invert(1); opacity: .92; }
.media-emblem.light {
  background: linear-gradient(150deg, var(--sky) 0%, #ffffff 100%);
  border: 1px solid var(--line);
}

/* ---------- Highlight cards (home trio) ---------- */
.card-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem;
}
.hcard {
  border-radius: var(--radius); padding: 2.2rem 1.9rem; color: #fff;
  min-height: 340px; position: relative; overflow: hidden;
  box-shadow: var(--shadow); transition: transform .3s;
}
.hcard:hover { transform: translateY(-6px); }
.hcard h3 { font-family: var(--serif); font-size: 1.7rem; margin: 0 0 .9rem; }
.hcard p { font-size: 1rem; margin: 0; color: rgba(255,255,255,.94); }
.hcard.green  { background: linear-gradient(160deg, var(--green) 0%, var(--green-darker) 100%); }
.hcard.orange { background: linear-gradient(160deg, #f07c3d 0%, var(--orange) 100%); }
.hcard.purple { background: linear-gradient(160deg, #a87fce 0%, #7e54b0 100%); }

/* ---------- Activity flip cards ---------- */
.activity-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
}
.flip { perspective: 1200px; min-height: 320px; }
.flip-inner {
  position: relative; width: 100%; height: 100%; min-height: 320px;
  transition: transform .7s cubic-bezier(.4,0,.2,1);
  transform-style: preserve-3d;
}
.flip:hover .flip-inner, .flip:focus-within .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0; backface-visibility: hidden;
  border-radius: var(--radius); padding: 2rem 1.7rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; box-shadow: var(--shadow);
}
.flip-front {
  background: linear-gradient(160deg, var(--green) 0%, var(--green-darker) 100%);
  color: var(--cream);
}
.flip-front .icon {
  width: 64px; height: 64px; margin-bottom: 1rem; color: var(--orange);
}
.flip-front h3 { font-family: var(--serif); font-size: 1.4rem; margin: 0; }
.flip-back {
  background: var(--orange); color: #fff; transform: rotateY(180deg);
}
.flip-back p { margin: 0; font-size: 1rem; }

/* ---------- Quote / blockquote ---------- */
blockquote.quote {
  background: var(--cream);
  border-left: 5px solid var(--orange);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 2rem 2.2rem; margin: 2rem 0;
  font-size: 1.08rem; color: var(--ink);
}
blockquote.quote cite {
  display: block; margin-top: 1.2rem; font-style: normal;
  font-weight: 600; color: var(--green-dark);
}

/* ---------- Prose (text-heavy pages) ---------- */
.prose { max-width: 820px; margin-inline: auto; }
.prose p { margin: 0 0 1.3rem; color: #34433c; }
.prose h2 {
  font-family: var(--serif); color: var(--green-darker);
  font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 2.6rem 0 1rem;
}
.prose h3, .prose h4 {
  font-family: var(--serif); color: var(--green-dark); margin: 2rem 0 .8rem;
}
.prose ul { padding-left: 1.3rem; margin: 0 0 1.3rem; }
.prose li { margin-bottom: .4rem; }
.prose .verse {
  background: linear-gradient(150deg, var(--sky-soft), #fff);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.8rem; font-style: italic; color: var(--green-dark);
  white-space: pre-wrap;
}

/* ---------- Page banner ---------- */
.page-banner {
  background: linear-gradient(160deg, var(--green) 0%, var(--green-darker) 100%);
  color: var(--cream); text-align: center; padding: clamp(3rem, 9vh, 5.5rem) 0;
}
.page-banner h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.1rem, 5vw, 3.4rem); margin: 0;
}
.page-banner p { margin: .8rem 0 0; color: rgba(245,239,226,.85); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
.contact-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2.2rem; box-shadow: var(--shadow);
}
.contact-card h2 {
  font-family: var(--serif); color: var(--green-darker); font-size: 1.5rem;
  margin: 0 0 1rem;
}
.contact-card .ico {
  display: inline-flex; width: 42px; height: 42px; border-radius: 10px;
  background: var(--sky); color: var(--green); align-items: center; justify-content: center;
  margin-bottom: 1rem; font-size: 1.2rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-darker); color: var(--cream);
  padding: 3.5rem 0 2rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.site-footer h4 {
  font-family: var(--serif); font-size: 1.3rem; margin: 0 0 1rem; color: #fff;
}
.site-footer p, .site-footer li { color: rgba(245,239,226,.82); font-size: .96rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul a { color: rgba(245,239,226,.82); }
.site-footer ul a:hover { color: #fff; }
.footer-social { display: flex; gap: 1rem; margin-top: 1rem; font-size: 1.25rem; }
.footer-social a { color: rgba(245,239,226,.7); }
.footer-social a:hover { color: var(--orange); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.4rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem;
  font-size: .9rem; color: rgba(245,239,226,.65);
}

/* ---------- Blog listing ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center;
  margin-bottom: 2.6rem;
}
.chip {
  border: 1px solid rgba(47,106,77,.25); background: #fff; color: var(--green-dark);
  padding: .45rem 1.1rem; border-radius: 999px; font-family: var(--bn);
  font-size: .92rem; cursor: pointer; transition: all .2s;
}
.chip:hover { border-color: var(--orange); color: var(--orange); }
.chip.active { background: var(--green); border-color: var(--green); color: #fff; }

.post-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem;
}
.post-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .3s; text-decoration: none; color: inherit;
}
.post-card:hover { transform: translateY(-6px); }
.post-card .thumb {
  aspect-ratio: 16/10; overflow: hidden; background: linear-gradient(150deg,var(--green),var(--green-darker));
  display: flex; align-items: center; justify-content: center;
}
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .thumb .ph { width: 46%; filter: brightness(0) invert(1); opacity: .85; }
.post-card .body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.post-card .meta { font-size: .82rem; color: var(--orange); font-weight: 600; }
.post-card .meta time { color: var(--muted); font-weight: 400; }
.post-card h3 {
  font-family: var(--serif); font-size: 1.25rem; line-height: 1.4;
  margin: 0; color: var(--green-darker);
}
.post-card .more { margin-top: auto; color: var(--green); font-weight: 600; font-size: .92rem; }

.load-more-wrap { text-align: center; margin-top: 3rem; }

/* ---------- Single post ---------- */
.post-article { max-width: 800px; margin-inline: auto; }
.post-article .post-meta {
  display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
  color: var(--muted); font-size: .95rem; margin-bottom: 2rem;
}
.post-article .badge {
  background: var(--sky); color: var(--green-dark); padding: .3rem .9rem;
  border-radius: 999px; font-weight: 600; font-size: .85rem;
}
.post-article p { margin: 0 0 1.3rem; color: #34433c; }
.post-article img { border-radius: var(--radius); margin: 1rem 0; box-shadow: var(--shadow); }
.post-article h2, .post-article h3 { font-family: var(--serif); color: var(--green-darker); margin: 2rem 0 1rem; }
.post-article figure { margin: 1.4rem 0; }
.post-article ul { padding-left: 1.3rem; }
.post-video { position: relative; padding-bottom: 56.25%; height: 0; margin: 1.6rem 0; border-radius: var(--radius); overflow: hidden; }
.post-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.back-link { display: inline-block; margin-bottom: 1.5rem; color: var(--green); font-weight: 600; }
.post-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.post-nav a { font-weight: 600; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-desktop { display: none; }
  .menu-toggle { display: inline-flex; }
  .card-grid, .activity-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .split { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
