/* Learnnity.in — मुख्य Stylesheet (Indigo / Teal Brand) */

:root {
  --primary: #3730A3;
  --primary-dark: #2E2680;
  --accent: #0D9488;
  --accent-light: #D9F5F0;
  --bg: #FAF7F2;
  --text: #262626;
  --grey: #666666;
  --border: #E5E5E5;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Noto Sans Devanagari', 'Poppins', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { text-decoration: none; color: var(--primary); }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Header ---- */
.site-header {
  background: var(--primary);
  padding: 11px 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
}
.brand .logo-box {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800;
}
/* Logo icon (book graphic only, no text baked in) + "Learnnity" + tagline
   written separately in HTML beside it — flat, compact header/footer lockup */
.logo-icon-img { height: 38px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; justify-content: center; line-height: 1.15; }
.brand-name { color: #fff; font-weight: 800; font-size: 21px; letter-spacing: 0.2px; white-space: nowrap; }
.brand-tagline { font-size: 10.5px; font-weight: 600; color: #C7D2FE; margin-top: 2px; white-space: nowrap; }
.site-footer .logo-icon-img { height: 30px; }
.site-footer .brand-name { font-size: 17px; }
.site-footer .brand-tagline { font-size: 10px; color: #9AA3D6; }
.nav-links { display: flex; gap: 22px; flex-wrap: wrap; }
.nav-links a { color: #C7D2FE; font-size: 14px; font-weight: 600; }
.nav-links a:hover, .nav-links a.active { color: #fff; }

/* ---- Mobile Menu Button (Hamburger — Desktop पर छुपा रहता है) ---- */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
  flex: none;
}
.mobile-menu-btn:hover { background: rgba(255,255,255,0.18); }

/* ---- Mobile Side Navigation Drawer + Overlay ---- */
.mobile-nav-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 8, 30, 0.55);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  z-index: 1000;
}
.mobile-nav-overlay.open { opacity: 1; visibility: visible; }

.mobile-nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 78%; max-width: 300px;
  background: var(--primary-dark);
  box-shadow: -10px 0 30px rgba(0,0,0,0.3);
  transform: translateX(100%);
  transition: transform .28s ease;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.mobile-nav-drawer.open { transform: translateX(0); }

.mobile-nav-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.mobile-nav-close {
  background: transparent; border: none; color: #fff;
  font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px;
}
.mobile-nav-links { display: flex; flex-direction: column; padding: 10px 8px; }
.mobile-nav-links a {
  color: #E3E6FF; font-size: 15.5px; font-weight: 600;
  padding: 14px 14px; border-radius: 10px;
}
.mobile-nav-links a:hover, .mobile-nav-links a.active { background: rgba(255,255,255,0.08); color: #fff; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: none;
  gap: 8px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(13,148,136,0.35); }
.btn-primary:hover { background: #0B7B71; transform: translateY(-2px); }
.btn-outline { background: rgba(255,255,255,0.06); color: #fff; border: 1.5px solid #8B93F5; }
.btn-outline:hover { background: rgba(255,255,255,0.14); transform: translateY(-2px); }
.btn-dark { background: var(--primary); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, #322C9E 0%, #4338CA 55%, #4F46E5 100%);
  padding: 72px 0 60px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -130px; right: -110px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13,148,136,0.35), rgba(13,148,136,0) 70%);
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -150px; left: -90px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(129,140,248,0.35), rgba(129,140,248,0) 70%);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: 38px; margin: 0 0 14px; line-height: 1.3; max-width: 680px; }
.hero p { color: #D9DCFF; font-size: 16.5px; max-width: 600px; }
.badge {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(13,148,136,0.18);
  border: 1px solid var(--accent);
  color: #5EEAD4;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}
.hero-trust { display: flex; gap: 10px 26px; flex-wrap: wrap; margin-top: 30px; }
.hero-trust-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #E3E6FF; font-weight: 600; }
.hero-trust-item .dot { width: 7px; height: 7px; border-radius: 50%; background: #5EEAD4; flex: none; }

/* ---- Cards / Grid ---- */
.section { padding: 52px 0; }
.section-eyebrow {
  display: block; text-align: center; font-size: 12.5px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.section-title { font-size: 27px; font-weight: 800; color: var(--primary); margin: 0 0 8px; text-align: center; }
.section-sub { text-align: center; color: var(--grey); margin-bottom: 30px; font-size: 14.5px; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

/* ---- Product Grid (Home + Store listing) ----
   4 per row on Desktop/Laptop, 2 per row on Tablet, 1 per row on Mobile */
.product-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(4, 1fr);
}
.product-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(55,48,163,0.14); }
.product-card .cover {
  width: 100%; aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--primary), #4338CA);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 16px; text-align: center; padding: 18px;
}
.product-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { padding: 16px 17px 18px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.product-card .meta { font-size: 12px; color: var(--grey); }
.product-card h3 {
  margin: 0; font-size: 16px; line-height: 1.32; color: var(--primary); font-weight: 700;
  max-height: 2.65em; overflow: hidden;
}
.product-card .desc {
  font-size: 13px; color: var(--grey); flex: 1; line-height: 1.5;
}
.product-card .price-row { display: flex; align-items: baseline; gap: 8px; margin-top: 5px; }
.price-now { font-size: 19px; font-weight: 800; color: var(--primary); }
.price-old { font-size: 13px; color: #999; text-decoration: line-through; }

.view-all-wrap { text-align: center; margin-top: 30px; }

/* Legacy alias: some pages may still reference the old product listing
   markup (`grid grid-3` wrapping `.product-card`) — keep it compact too */
.grid.grid-3 > .product-card,
.grid.grid-2 > .product-card {
  /* inherits .product-card rules above automatically */
}

/* ---- Feature / benefit cards ---- */
.feature-icon {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--accent-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; margin-bottom: 10px;
}

/* ---- Breadcrumb ---- */
.breadcrumb { font-size: 13px; color: var(--grey); margin: 0 0 16px; }
.breadcrumb a { color: var(--primary); font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 6px; color: #B9BDC9; }

/* ---- Product Detail ---- */
.product-hero { padding: 36px 0 48px; background: var(--accent-light); }
.product-hero .grid-2 { align-items: start; gap: 40px; }
.product-hero .cover-lg {
  width: 100%; max-width: 340px; margin: 0 auto; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, var(--primary), #4338CA);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 22px; text-align: center; padding: 32px;
  aspect-ratio: 3/4;
  box-shadow: 0 20px 45px rgba(55,48,163,0.22);
}
.product-hero .cover-lg img { width: 100%; height: 100%; object-fit: cover; }
.stat-pills { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.pill { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--primary); font-weight: 600; }
.buy-box { background: #fff; border-radius: var(--radius); padding: 22px; border: 1px solid var(--border); margin-top: 18px; box-shadow: 0 14px 34px rgba(31,27,75,0.08); }
.offer-ribbon {
  display: inline-block; background: #FEF3C7; color: #92400E; font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 12px;
}
@media (min-width: 861px) {
  .buy-box-col { position: sticky; top: 24px; }
}

/* ---- FAQ (native <details> accordion) ---- */
.faq-item { border-bottom: 1px solid var(--border); padding: 4px 0; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 14px 28px 14px 0; position: relative;
  color: var(--primary); font-size: 15px; font-weight: 700;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 2px; top: 12px; font-size: 20px; color: var(--accent); font-weight: 700;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0 0 16px; color: var(--grey); font-size: 14px; }

/* ---- Review cards ---- */
.review-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex: none;
}

/* ---- Footer ---- */
.site-footer { background: var(--primary-dark); color: #C7D2FE; padding: 40px 0 24px; margin-top: 40px; }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.site-footer a { color: #C7D2FE; font-size: 13px; }
.site-footer a:hover { color: #fff; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-bottom { text-align: center; font-size: 12px; color: #9AA3D6; margin-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 18px; }

/* ---- Forms ---- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 11px 14px; border-radius: 8px; border: 1px solid var(--border);
  font-family: inherit; font-size: 14px;
}
.form-group textarea { min-height: 110px; resize: vertical; }

.alert { padding: 14px 18px; border-radius: 10px; font-size: 14px; margin-bottom: 18px; }
.alert-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-error { background: #FEF2F2; color: #7F1D1D; border: 1px solid #FCA5A5; }

/* ---- Category Filter Pills (Store page — light background) ---- */
.cat-pill {
  display: inline-flex; align-items: center;
  padding: 9px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  background: #fff; color: var(--primary); border: 1.5px solid var(--border);
  transition: all .15s ease;
}
.cat-pill:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.cat-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- Blog (Listing Grid + Card) ---- */
.blog-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, 1fr);
}
.blog-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(55,48,163,0.14); }
.blog-card-cover {
  width: 100%; aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 22px;
}
.blog-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 16px 17px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.blog-card-category {
  display: inline-flex; align-self: flex-start;
  font-size: 11.5px; font-weight: 700; color: var(--accent);
  background: var(--accent-light); padding: 3px 10px; border-radius: 999px;
}
.blog-card-body h3 { margin: 0; font-size: 16px; line-height: 1.35; color: var(--primary); font-weight: 700; }
.blog-card-excerpt { font-size: 13px; color: var(--grey); line-height: 1.5; flex: 1; margin: 0; }
.blog-card-date { font-size: 12px; color: #999; }

/* ---- Blog Single Post Content (Admin-authored HTML) ---- */
.blog-post-content { font-size: 15.5px; line-height: 1.85; color: var(--text); }
.blog-post-content h2 { color: var(--primary); font-size: 21px; margin: 30px 0 12px; }
.blog-post-content h3 { color: var(--primary); font-size: 17px; margin: 24px 0 10px; }
.blog-post-content p { margin: 0 0 16px; }
.blog-post-content ul, .blog-post-content ol { margin: 0 0 16px; padding-left: 22px; }
.blog-post-content li { margin-bottom: 6px; }
.blog-post-content img { border-radius: 10px; margin: 16px 0; }
.blog-post-content a { color: var(--accent); text-decoration: underline; }
.blog-post-content blockquote {
  border-left: 3px solid var(--accent); margin: 18px 0; padding: 4px 18px; color: var(--grey); font-style: italic;
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 28px; }
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }
  /* Tablet: 2 eBook cards per row */
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .product-hero .grid-2 { grid-template-columns: 1fr; }
  /* Mobile: 1 eBook card per row */
  .product-grid { grid-template-columns: 1fr; gap: 16px; }
  .product-card { flex-direction: row; }
  .product-card .cover { width: 150px; aspect-ratio: auto; flex: none; }
  .product-card .body { padding: 14px 16px; }
  .blog-grid { grid-template-columns: 1fr; gap: 16px; }
}
