/*
Theme Name: iknmbd
Theme URI: https://rajugreenlover.com
Author: Raju Ahmed
Author URI: https://rajugreenlover.com
Description: A neutral, educational and awareness-driven WordPress theme with Bengali-friendly typography, a modern sticky header, mobile drawer navigation, and WPForms-ready page templates.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: iknmbd
*/

/* -------------------------------
   0) FONTS (Bengali-friendly)
---------------------------------*/
@import url("https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;600;700&family=Noto+Sans+Bengali:wght@400;600;700&display=swap");

/* -------------------------------
   1) CSS RESET / BASE
---------------------------------*/
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: "Hind Siliguri", "Noto Sans Bengali", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: #1e293b;
  background: #f6f8fb;
  line-height: 1.65;
  font-size: 16px;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: #2563eb;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}
h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  line-height: 1.25;
}
p {
  margin: 0 0 1em;
}

/* Utilities */
.mt-0 {
  margin-top: 0;
}
.mb-0 {
  margin-bottom: 0;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mt-4 {
  margin-top: 1rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.mt-6 {
  margin-top: 1.5rem;
}
.mb-6 {
  margin-bottom: 1.5rem;
}
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.round {
  border-radius: 12px;
}

/* -------------------------------
   2) GLOBAL COMPONENTS
---------------------------------*/
.card {
  background: #ffffff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.06);
}
.button,
.ik-btn {
  display: inline-block;
  background: #3b82f6;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.25);
}
.button:hover,
.ik-btn:hover {
  background: #2563eb;
  text-decoration: none;
}
.grid {
  display: grid;
  gap: 22px;
}
.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* -------------------------------
   3) HEADER + NAVIGATION
---------------------------------*/
.ik-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #0f2f52 0%, #0c2642 100%);
  color: #eaf3ff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  backdrop-filter: saturate(120%) blur(6px);
}
.ik-header .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}
.ik-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
}

/* Brand */
.ik-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.ik-brand-logo img {
  height: 44px;
  width: auto;
  display: block;
  border-radius: 10px;
}
.ik-brand-fallback {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #eaf3ff;
  color: #0f2f52;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.ik-brand-text {
  display: flex;
  flex-direction: column;
}
.ik-brand-title {
  font-weight: 700;
  line-height: 1;
}
.ik-brand-tagline {
  font-size: 0.85rem;
  opacity: 0.8;
  line-height: 1.2;
}

/* Desktop nav */
.ik-nav {
}
.ik-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 22px;
}
.ik-menu > li {
  position: relative;
}
.ik-menu a {
  color: #eaf3ff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 2px;
  border-bottom: 2px solid transparent;
}
.ik-menu a:hover {
  border-color: #5390ff;
}

/* Submenus (desktop hover) */
.ik-menu li:hover > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.ik-menu ul {
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 200px;
  list-style: none;
  margin: 8px 0 0;
  padding: 10px;
  background: #0c2642;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.18s ease;
}
.ik-menu ul li {
  margin: 0;
}
.ik-menu ul a {
  padding: 8px 10px;
  display: block;
  border: none;
}

/* Header actions */
.ik-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ik-burger {
  display: none;
  background: none;
  border: none;
  color: #eaf3ff;
  cursor: pointer;
}

/* -------------------------------
   4) MOBILE DRAWER (with backdrop)
---------------------------------*/
/* The drawer itself */
.ik-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(84vw, 360px);
  background: #0d2b49;
  color: #eaf3ff;
  z-index: 1100;
  transform: translateX(100%);
  transition: transform 0.22s ease;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.35);
}
/* Backdrop: covers the left side of the viewport (prevents transparency issue) */
.ik-drawer::before {
  content: "";
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  right: min(84vw, 360px);
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}
.ik-drawer.is-open {
  transform: translateX(0);
}
.ik-drawer.is-open::before {
  opacity: 1;
  pointer-events: auto;
}

.ik-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ik-drawer-title {
  font-weight: 700;
}
.ik-close {
  background: none;
  border: none;
  color: #eaf3ff;
  cursor: pointer;
}
.ik-drawer-nav {
  padding: 10px 8px 18px;
}
.ik-drawer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ik-drawer-menu li a {
  display: block;
  padding: 12px 12px;
  color: #eaf3ff;
  border-radius: 8px;
  text-decoration: none;
}
.ik-drawer-menu li a:hover {
  background: rgba(255, 255, 255, 0.08);
}
.ik-btn-full {
  display: block;
  margin: 10px 8px 0;
  text-align: center;
}

/* Optional: prevent body scroll when drawer open (JS toggles .no-scroll on <body>) */
body.no-scroll {
  overflow: hidden;
}

/* -------------------------------
   5) HERO / PAGE LAYOUT
---------------------------------*/
.hero {
  background: linear-gradient(180deg, #0e3c67 0%, #0b2e4e 100%);
  color: #fff;
  padding: 80px 0;
}
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 36px);
}
.hero p {
  margin: 0;
  opacity: 0.95;
}

/* Default main wrapper spacing */
.ik-main {
  padding: 32px 0;
}

/* -------------------------------
   6) FOOTER
---------------------------------*/
.site-footer {
  background: #0b2e4e;
  color: #e8f1ff;
  padding: 26px 0;
  margin-top: 40px;
  font-size: 0.98rem;
}
.site-footer a {
  color: #e8f1ff;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

/* -------------------------------
   7) RESPONSIVE
---------------------------------*/
@media (max-width: 992px) {
  .ik-menu {
    display: none;
  }
  .ik-burger {
    display: inline-flex;
  }
  .ik-brand-tagline {
    display: none;
  } /* keep header compact on small screens */
}
@media (max-width: 640px) {
  .container {
    padding: 0 12px;
  }
  .card {
    border-radius: 12px;
    padding: 16px;
  }
}

/* -------------------------------
   8) FOOTER STYLES
---------------------------------*/
.ik-footer {
  background: linear-gradient(180deg, #0b2e4e 0%, #091f35 100%);
  color: #eaf3ff;
  padding: 60px 0 30px;
  font-size: 0.95rem;
}
.ik-footer-inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
  text-align: center;
}
.ik-footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.ik-footer-logo img {
  height: 60px;
  width: auto;
  border-radius: 12px;
}
.ik-footer-fallback {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #eaf3ff;
  color: #0b2e4e;
  font-weight: 700;
  font-size: 1.3rem;
}
.ik-footer-title {
  margin: 0;
  font-weight: 700;
  font-size: 1.3rem;
}
.ik-footer-tagline {
  margin: 0;
  opacity: 0.85;
  font-size: 0.9rem;
}

.ik-footer-nav {
  display: flex;
  justify-content: center;
}
.ik-footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.ik-footer-menu a {
  color: #eaf3ff;
  text-decoration: none;
  font-weight: 500;
}
.ik-footer-menu a:hover {
  text-decoration: underline;
  color: #60a5fa;
}

.ik-footer-copy {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  opacity: 0.8;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .ik-footer-inner {
    gap: 24px;
  }
  .ik-footer-menu {
    flex-direction: column;
    gap: 10px;
  }
}

/* -------------------------------
   HOME PAGE
---------------------------------*/
.home-hero {
  background: linear-gradient(140deg, #0e3c67 0%, #0b2e4e 45%, #0a1f36 100%);
  color: #fff;
  padding: 80px 0 70px;
  position: relative;
  overflow: hidden;
}
.home-hero-inner {
  position: relative;
}
.home-hero-copy h1 {
  font-size: clamp(30px, 5vw, 44px);
  margin: 0 0 10px;
}
.home-hero-copy .lead {
  opacity: 0.95;
  font-size: clamp(16px, 2vw, 18px);
}
.home-hero-cta {
  margin-top: 16px;
}
.home-hero-shape {
  position: absolute;
  right: -120px;
  top: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(
    closest-side,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0)
  );
  border-radius: 50%;
}

.home-features {
  padding: 40px 0;
  margin-top: -30px;
}
.home-feature {
  text-align: left;
}
.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #eff6ff;
  color: #1e40af;
  margin-bottom: 10px;
}
.feature-icon svg {
  width: 28px;
  height: 28px;
}

.stats-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  background: #0f2f52;
  color: #eaf3ff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}
.stat {
  text-align: center;
}
.stat-num {
  font-weight: 800;
  font-size: clamp(22px, 3.4vw, 28px);
}
.stat-txt {
  opacity: 0.9;
  font-size: 0.98rem;
}

.home-content {
  padding: 20px 0 40px;
}

.home-posts {
  padding: 20px 0 50px;
}
.home-section-title {
  margin-bottom: 14px;
}

.post-title {
  margin: 0.3rem 0 0.5rem;
  font-size: 1.15rem;
}
.post-excerpt {
  margin: 0 0 0.8rem;
}

.home-cta {
  padding: 0 0 60px;
}
.home-cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
}

/* Responsive */
@media (max-width: 992px) {
  .stats-wrap {
    grid-template-columns: 1fr;
  }
  .home-cta-card {
    flex-direction: column;
    text-align: center;
  }
}

/* --- Essay Accordion Wrapper --- */
.essay-accordion-wrapper {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.essay-accordion-item {
  border-bottom: 1px solid #ddd;
}
.essay-accordion-item:last-child {
  border-bottom: none;
}

/* --- Accordion Title (The Button) --- */
.essay-accordion-title {
  width: 100%;
  background: #f9f9f9;
  border: none;
  padding: 16px 20px;
  font-size: 18px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.3s;
  position: relative;
  padding-right: 40px; /* Space for the icon */
}

.essay-accordion-title:hover {
  background-color: #f1f1f1;
}

/* --- The +/- Icon --- */
.essay-accordion-title::after {
  content: "+"; /* Show plus by default */
  position: absolute;
  right: 20px;
  font-size: 22px;
  font-weight: bold;
  color: #777;
}

.essay-accordion-item.active .essay-accordion-title::after {
  content: "−"; /* Show minus when active */
}

/* --- Accordion Content (Your Idea) --- */
.essay-accordion-content {
  background: #fff;
  padding: 0;
  max-height: 0; /* This is how it starts hidden */
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

/* --- THE SCROLLBAR --- */
/* This is the container that has your scrollbar idea */
.essay-accordion-content-inner {
  padding: 20px;
  /* This is your scrolling idea! */
  max-height: 450px; /* Set a max height */
  overflow-y: auto; /* Add scrollbar ONLY if needed */
}

/* --- The JavaScript 'active' state --- */
.essay-accordion-item.active .essay-accordion-content {
  max-height: 500px; /* Animate to this height. The inner div handles the scroll */
  padding: 0;
}
