/*
Theme Name:   AyurSiddhi
Theme URI:    https://ayurvedasidhi.com
Description:  Digital-library design for Ayurveda Siddhi. Child theme of Astra.
Author:       Ayurveda Siddhi
Template:     astra
Version:      1.0.0
Text Domain:  ayursiddhi
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */

:root {
  --as-ink: #0f1f1a;
  --as-ink-2: #34443e;
  --as-muted: #66756f;
  --as-line: #e3e9e6;
  --as-line-2: #d3ddd8;
  --as-bg: #f6f8f7;
  --as-surface: #ffffff;
  --as-brand: #0b6b52;
  --as-brand-600: #085942;
  --as-brand-700: #064433;
  --as-brand-50: #e7f4ef;
  --as-brand-100: #cfe9df;
  --as-accent: #f2a516;
  --as-accent-600: #d98e05;
  --as-accent-50: #fff5df;

  --as-font: "Inter", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --as-font-head: "Plus Jakarta Sans", "Noto Sans Devanagari", "Inter", system-ui, sans-serif;

  --as-r-sm: 8px;
  --as-r: 12px;
  --as-r-lg: 18px;
  --as-r-xl: 24px;
  --as-shadow-sm: 0 1px 2px rgba(15, 31, 26, .06), 0 1px 3px rgba(15, 31, 26, .05);
  --as-shadow: 0 4px 14px rgba(15, 31, 26, .07), 0 1px 3px rgba(15, 31, 26, .05);
  --as-shadow-lg: 0 18px 40px rgba(15, 31, 26, .12), 0 4px 10px rgba(15, 31, 26, .05);
  --as-wrap: 1240px;
  --as-header-h: 68px;

  /* Re-map Astra's palette so every Astra-generated element follows the new colours */
  --ast-global-color-0: var(--as-brand);
  --ast-global-color-1: var(--as-brand-600);
  --ast-global-color-2: var(--as-ink);
  --ast-global-color-3: var(--as-ink-2);
  --ast-global-color-4: var(--as-bg);
  --ast-global-color-5: #ffffff;
  --ast-global-color-6: var(--as-brand-50);
  --ast-global-color-7: var(--as-ink);
  --ast-global-color-8: var(--as-ink);
}

/* Elementor pages (subject landing pages) pick up the same fonts and colours */
.elementor-kit-15964 {
  --e-global-typography-primary-font-family: "Plus Jakarta Sans";
  --e-global-typography-secondary-font-family: "Plus Jakarta Sans";
  --e-global-typography-text-font-family: "Inter";
  --e-global-typography-accent-font-family: "Inter";
  --e-global-color-primary: var(--as-brand);
  --e-global-color-secondary: var(--as-ink-2);
  --e-global-color-text: var(--as-ink-2);
  --e-global-color-accent: var(--as-accent);
}

/* ==========================================================================
   2. Base typography
   ========================================================================== */

html { scroll-behavior: smooth; }
html.as-lock { overflow: hidden; }

body.as-theme,
.as-theme button,
.as-theme input,
.as-theme select,
.as-theme textarea,
.as-theme .elementor-widget-text-editor,
.as-theme .entry-content {
  font-family: var(--as-font);
}

body.as-theme {
  background: var(--as-bg);
  color: var(--as-ink-2);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.as-theme h1, .as-theme h2, .as-theme h3, .as-theme h4, .as-theme h5, .as-theme h6,
.as-theme .entry-title,
.as-theme .elementor-heading-title {
  font-family: var(--as-font-head);
  color: var(--as-ink);
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.as-theme a { color: var(--as-brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.as-theme a:hover { color: var(--as-brand-600); }
.as-theme :focus-visible { outline: 2px solid var(--as-accent); outline-offset: 2px; border-radius: 4px; }

.as-ico { flex: none; display: inline-block; vertical-align: middle; }
.as-wrap { width: 100%; max-width: var(--as-wrap); margin: 0 auto; padding: 0 20px; }

.as-h1 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); font-weight: 800; margin: 0 0 6px; }
.as-h1__hi { color: var(--as-muted); font-weight: 600; font-size: .7em; }
.as-h2 { font-size: clamp(1.3rem, 1.1rem + .9vw, 1.75rem); font-weight: 800; margin: 0; }
.as-sec-sub { color: var(--as-muted); margin: 4px 0 0; font-size: .975rem; }

/* ==========================================================================
   3. Buttons, chips, search
   ========================================================================== */

.as-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 999px; border: 0;
  font: 600 15px/1 var(--as-font); text-decoration: none !important; cursor: pointer;
  transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.as-btn:active { transform: translateY(1px); }
.as-btn--brand { background: var(--as-brand); color: #fff !important; }
.as-btn--brand:hover { background: var(--as-brand-600); }
.as-btn--accent { background: var(--as-accent); color: #2a1c00 !important; }
.as-btn--accent:hover { background: var(--as-accent-600); }
.as-btn--lg { height: 54px; padding: 0 26px; font-size: 16px; }
.as-btn--block { width: 100%; }

.as-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--as-surface); border: 1px solid var(--as-line);
  color: var(--as-ink-2) !important; font-size: 13px; font-weight: 500; line-height: 1.3;
  text-decoration: none !important; transition: border-color .15s, background .15s;
}
a.as-chip:hover { border-color: var(--as-brand); color: var(--as-brand) !important; }
.as-chip--brand { background: var(--as-brand-50); border-color: var(--as-brand-100); color: var(--as-brand-700) !important; font-weight: 600; }
.as-chip--ghost { background: transparent; color: var(--as-muted) !important; }

.as-search {
  position: relative; display: flex; align-items: center;
  background: var(--as-bg); border: 1px solid var(--as-line); border-radius: 999px;
  padding: 0 14px; height: 42px; color: var(--as-muted);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.as-search:focus-within { background: #fff; border-color: var(--as-brand); box-shadow: 0 0 0 4px var(--as-brand-50); }
.as-search input[type="search"] {
  flex: 1; min-width: 0; height: 100%; border: 0 !important; background: transparent !important;
  padding: 0 0 0 10px !important; margin: 0; box-shadow: none !important; outline: none;
  font-size: 15px; color: var(--as-ink);
}
.as-search input::placeholder { color: #8b9893; }
.as-search--page { max-width: 560px; margin-top: 18px; background: #fff; height: 48px; }

/* ==========================================================================
   4. Header
   ========================================================================== */

/* Hide anything from Astra's/Elementor's old header if it still renders */
.as-theme #masthead, .as-theme .ast-mobile-popup-drawer, .as-theme .elementor-location-header { display: none !important; }

.as-header {
  position: sticky; top: 0; z-index: 999;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--as-line);
  transition: box-shadow .2s ease;
}
.admin-bar .as-header { top: 32px; }
.as-header.is-scrolled { box-shadow: 0 4px 18px rgba(15, 31, 26, .07); }
.as-header__bar { height: var(--as-header-h); display: flex; align-items: center; gap: 22px; }

.as-brand { display: flex; align-items: center; flex: none; }
.as-brand img { height: 42px; width: auto; display: block; }
.as-brand__text { font: 800 20px var(--as-font-head); color: var(--as-ink); }

.as-nav { flex: none; }
.as-nav__list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.as-nav__list > li { position: relative; }
.as-nav__list > li > a,
.as-nav__btn {
  display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 12px;
  border-radius: 999px; border: 0; background: transparent; cursor: pointer;
  color: var(--as-ink-2) !important; font: 500 15px/1 var(--as-font); text-decoration: none !important;
  transition: background .15s, color .15s;
}
.as-nav__list > li > a:hover, .as-nav__btn:hover, .as-has-mega.is-open > .as-nav__btn { background: var(--as-brand-50); color: var(--as-brand-700) !important; }
.as-nav__btn .as-ico { transition: transform .2s; }
.as-has-mega.is-open > .as-nav__btn .as-ico { transform: rotate(180deg); }

.as-mega {
  position: absolute; top: calc(100% + 10px); left: -12px; z-index: 50;
  display: grid; grid-template-columns: 300px 220px; gap: 10px;
  padding: 14px; background: #fff; border: 1px solid var(--as-line); border-radius: var(--as-r-lg);
  box-shadow: var(--as-shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .16s, transform .16s, visibility .16s;
}
.as-mega::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.as-mega--sm { grid-template-columns: 250px; }
.as-has-mega:hover > .as-mega, .as-has-mega.is-open > .as-mega, .as-has-mega:focus-within > .as-mega { opacity: 1; visibility: visible; transform: none; }
.as-mega__label { margin: 4px 8px 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--as-muted); }
.as-mega__item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--as-r); text-decoration: none !important; color: var(--as-ink) !important; }
.as-mega__item:hover, .as-mega__link:hover { background: var(--as-bg); }
.as-mega__item strong { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.as-mega__item small { display: block; font-size: 12.5px; color: var(--as-muted); }
.as-mega__ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; }
.as-mega__link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: var(--as-r-sm); font-size: 14.5px; color: var(--as-ink-2) !important; text-decoration: none !important; }
.as-mega--sm .as-mega__link { justify-content: flex-start; }
.as-mega__link span { font-size: 12px; color: var(--as-muted); background: var(--as-bg); border-radius: 999px; padding: 1px 8px; }

.as-search--header { flex: 1; max-width: 420px; margin-left: auto; }
.as-header__cta { flex: none; height: 42px; }
.as-burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--as-ink); cursor: pointer; }
.as-burger:hover { background: var(--as-bg); }

.as-drawer { border-top: 1px solid var(--as-line); background: #fff; padding: 16px 20px 24px; max-height: calc(100vh - var(--as-header-h)); overflow-y: auto; }
.as-drawer[hidden] { display: none; }
.as-drawer__label { margin: 18px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--as-muted); }
.as-drawer__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.as-drawer__grid a { padding: 12px; border: 1px solid var(--as-line); border-radius: var(--as-r); font-weight: 600; font-size: 14.5px; color: var(--as-ink) !important; text-decoration: none !important; background: var(--as-bg); }
.as-drawer__list a { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--as-line); color: var(--as-ink-2) !important; text-decoration: none !important; font-size: 15px; }
.as-drawer .as-btn--block { margin-top: 20px; }

@media (max-width: 1100px) {
  .as-search--header { display: none; }
  .as-header__cta { margin-left: auto; }
}
@media (max-width: 900px) {
  .as-nav, .as-header__cta { display: none; }
  .as-burger { display: inline-grid; place-items: center; }
  .as-brand img { height: 36px; }
}
@media (max-width: 782px) { .admin-bar .as-header { top: 46px; } }

/* ==========================================================================
   5. Colour tones (covers, icons)
   ========================================================================== */

.as-tone--emerald { --t-bg: #e3f3ec; --t-fg: #0b6b52; --t-deep: #0b5c47; }
.as-tone--saffron { --t-bg: #fff1d6; --t-fg: #9a5b00; --t-deep: #b86e06; }
.as-tone--indigo  { --t-bg: #e8ebfb; --t-fg: #3341a8; --t-deep: #2f3c9e; }
.as-tone--rose    { --t-bg: #fde8ec; --t-fg: #a3274a; --t-deep: #9c2346; }
.as-tone--teal    { --t-bg: #e0f3f5; --t-fg: #0d6c78; --t-deep: #0c5f6a; }
.as-tone--plum    { --t-bg: #f1e8f7; --t-fg: #6b3290; --t-deep: #622c85; }
.as-mega__ico, .as-subject__ico, .as-tool__ico { background: var(--t-bg); color: var(--t-fg); }

/* ==========================================================================
   6. Homepage
   ========================================================================== */

.as-theme.home .site-content > .ast-container,
.as-theme.home #content > .ast-container,
.as-listing ~ *, .as-theme.archive .site-content > .ast-container,
.as-theme.search .site-content > .ast-container {
  max-width: none; padding: 0; display: block; margin: 0;
}
.as-home, .as-listing { width: 100%; }

.as-section { padding: 56px 0; }
.as-section--tint { background: #fff; border-top: 1px solid var(--as-line); border-bottom: 1px solid var(--as-line); }
.as-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.as-link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14.5px; text-decoration: none !important; white-space: nowrap; }

/* Hero */
.as-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 85% 10%, rgba(242, 165, 22, .14), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(11, 107, 82, .12), transparent 60%),
    linear-gradient(180deg, #f0f8f4 0%, var(--as-bg) 100%);
  border-bottom: 1px solid var(--as-line);
}
.as-hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 72px; }
.as-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--as-brand-100); color: var(--as-brand-700);
  font-size: 13px; font-weight: 600;
}
.as-eyebrow--light { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .25); color: #fff; }
.as-hero__title { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.5rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; margin: 18px 0 16px; }
.as-hero__title span { color: var(--as-brand); background: linear-gradient(transparent 62%, rgba(242, 165, 22, .35) 62%); }
.as-hero__sub { font-size: 1.125rem; color: var(--as-ink-2); max-width: 560px; margin: 0 0 28px; }

.as-hero__search {
  display: flex; align-items: center; gap: 10px; max-width: 620px;
  background: #fff; border: 1px solid var(--as-line-2); border-radius: 999px;
  padding: 6px 6px 6px 20px; box-shadow: var(--as-shadow); color: var(--as-muted);
  transition: box-shadow .15s, border-color .15s;
}
.as-hero__search:focus-within { border-color: var(--as-brand); box-shadow: 0 0 0 5px var(--as-brand-50), var(--as-shadow); }
.as-hero__search input[type="search"] {
  flex: 1; min-width: 0; height: 48px; border: 0 !important; background: transparent !important;
  padding: 0 !important; margin: 0; box-shadow: none !important; outline: none; font-size: 16px; color: var(--as-ink);
}
.as-hero__search .as-btn { height: 48px; padding: 0 26px; }
.as-hero__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; font-size: 13.5px; color: var(--as-muted); }

.as-hero__art { position: relative; height: 430px; }
.as-stack { position: absolute; inset: 0; }
.as-stack__doc {
  position: absolute; width: 230px; aspect-ratio: 400 / 520; border-radius: 10px; overflow: hidden;
  background: #fff; border: 1px solid var(--as-line); box-shadow: var(--as-shadow-lg);
}
.as-stack__doc img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.as-stack__doc--0 { left: 50%; top: 20px; transform: translateX(-50%) rotate(-1deg); z-index: 3; }
.as-stack__doc--1 { left: 6%; top: 70px; transform: rotate(-9deg); z-index: 2; opacity: .96; }
.as-stack__doc--2 { right: 4%; top: 70px; transform: rotate(8deg); z-index: 1; opacity: .96; }
.as-float {
  position: absolute; z-index: 5; display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--as-line); border-radius: 14px; padding: 10px 14px;
  box-shadow: var(--as-shadow-lg); font-size: 13.5px; color: var(--as-muted);
}
.as-float strong { color: var(--as-ink); font-size: 15px; }
.as-float .as-ico { color: var(--as-brand); }
.as-float--a { left: 0; bottom: 40px; }
.as-float--b { right: 0; bottom: 90px; }
.as-float--b .as-ico { color: var(--as-accent); }

/* Stats */
.as-stats { background: #fff; border-bottom: 1px solid var(--as-line); }
.as-stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.as-stats__grid > div { padding: 22px 16px; text-align: center; border-right: 1px solid var(--as-line); }
.as-stats__grid > div:last-child { border-right: 0; }
.as-stats strong { display: block; font: 800 1.75rem/1.1 var(--as-font-head); color: var(--as-ink); }
.as-stats span { font-size: 14px; color: var(--as-muted); }

/* Professional years */
.as-years { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.as-year {
  position: relative; display: flex; flex-direction: column; gap: 14px; min-height: 210px;
  padding: 22px; border-radius: var(--as-r-lg); background: #fff; border: 1px solid var(--as-line);
  text-decoration: none !important; color: var(--as-ink) !important; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.as-year::after { content: ""; position: absolute; right: -50px; top: -50px; width: 120px; height: 120px; border-radius: 50%; background: var(--t-bg); }
.as-year:hover { transform: translateY(-3px); box-shadow: var(--as-shadow-lg); border-color: transparent; }
.as-year__num { position: relative; z-index: 1; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--t-fg); color: #fff; font: 800 20px var(--as-font-head); }
.as-year__body, .as-year__count { position: relative; z-index: 1; }
.as-year__body strong { display: block; font: 700 1.05rem/1.3 var(--as-font-head); margin-bottom: 6px; }
.as-year__body small { display: block; font-size: 13.5px; line-height: 1.5; color: var(--as-muted); }
.as-year__count { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--t-fg); }

/* Shelf + cards */
.as-shelf { padding: 40px 0 8px; }
.as-shelf-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: 180px; gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 18px; margin: 0 -2px;
  scrollbar-width: thin; scrollbar-color: var(--as-line-2) transparent;
}
.as-shelf-row > .as-card { scroll-snap-align: start; }
.as-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 26px 20px; padding: 8px 0 24px; }

.as-card { min-width: 0; }
.as-card__cover {
  position: relative; display: block; aspect-ratio: 400 / 520; border-radius: 10px; overflow: hidden;
  background: var(--t-bg); border: 1px solid var(--as-line); box-shadow: var(--as-shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.as-card__cover:hover { transform: translateY(-3px); box-shadow: var(--as-shadow-lg); }
.as-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity .25s ease; }
.as-card__img.is-loaded { opacity: 1; background: #fff; }
.as-gen { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 16px 14px; color: var(--t-deep); background: linear-gradient(160deg, var(--t-bg) 0%, #fff 140%); }
.as-gen::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--t-fg); opacity: .85; }
.as-gen__top { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.as-gen__title { margin-top: 14px; font: 800 1.05rem/1.25 var(--as-font-head); color: var(--t-deep); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.as-gen__brand { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; opacity: .7; }
.as-card__type {
  position: absolute; left: 8px; bottom: 8px; z-index: 2;
  padding: 3px 9px; border-radius: 6px; background: rgba(15, 31, 26, .78); color: #fff;
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
}
.as-card__body { padding: 10px 2px 0; }
.as-card__title { margin: 0; font: 600 14.5px/1.4 var(--as-font); letter-spacing: 0; }
.as-card__title a { color: var(--as-ink) !important; text-decoration: none !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.as-card__title a:hover { color: var(--as-brand) !important; }
.as-card__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 4px 0 0; font-size: 12.5px; color: var(--as-muted); }
.as-card__meta span + span::before { content: "·"; margin-right: 10px; }

/* Subjects */
.as-subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.as-subject { min-width: 0; }
.as-subject {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--as-line); border-radius: var(--as-r); background: var(--as-bg);
  text-decoration: none !important; color: var(--as-ink) !important; transition: border-color .15s, background .15s, transform .15s;
}
.as-subject:hover { background: #fff; border-color: var(--as-brand-100); transform: translateY(-1px); }
.as-subject__ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; font: 800 17px var(--as-font-head); }
.as-subject__txt { min-width: 0; flex: 1; }
.as-subject__txt strong { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-subject__txt small { display: block; font-size: 13px; color: var(--as-muted); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-subject__n { flex: none; font-size: 12.5px; font-weight: 600; color: var(--as-muted); background: #fff; border: 1px solid var(--as-line); padding: 2px 9px; border-radius: 999px; }

/* Tools */
.as-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.as-tool {
  display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center;
  padding: 18px; border: 1px solid var(--as-line); border-radius: var(--as-r-lg); background: #fff;
  text-decoration: none !important; color: var(--as-ink) !important; transition: box-shadow .18s, transform .18s;
}
.as-tool:hover { box-shadow: var(--as-shadow); transform: translateY(-2px); }
.as-tool__ico { grid-row: span 2; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; }
.as-tool strong { font: 700 15.5px/1.3 var(--as-font-head); }
.as-tool small { font-size: 13.5px; color: var(--as-muted); line-height: 1.45; }

/* Premium band */
.as-premium {
  display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: 32px;
  padding: 44px; border-radius: var(--as-r-xl); color: #fff;
  background:
    radial-gradient(500px 260px at 100% 0%, rgba(242, 165, 22, .35), transparent 60%),
    linear-gradient(135deg, var(--as-brand) 0%, var(--as-brand-700) 100%);
  box-shadow: var(--as-shadow-lg);
}
.as-premium h2 { color: #fff; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); font-weight: 800; margin: 14px 0 16px; }
.as-premium ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.as-premium li { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .92); }
.as-premium li .as-ico { color: var(--as-accent); }
.as-premium__cta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; justify-self: end; }
.as-premium__cta small { color: rgba(255, 255, 255, .8); font-size: 13.5px; }

/* ==========================================================================
   7. Archive / search listing
   ========================================================================== */

.as-listing__head { background: linear-gradient(180deg, #f0f8f4, var(--as-bg)); border-bottom: 1px solid var(--as-line); padding: 34px 0 30px; margin-bottom: 28px; }
.as-crumbs { font-size: 13.5px; color: var(--as-muted); margin-bottom: 10px; }
.as-crumbs a { color: var(--as-muted) !important; text-decoration: none !important; }
.as-crumbs a:hover { color: var(--as-brand) !important; }
.as-crumbs span { margin: 0 4px; }
.as-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 10px 0 56px; }
.as-pager .page-numbers { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--as-line); background: #fff; color: var(--as-ink-2) !important; text-decoration: none !important; font-weight: 500; font-size: 14.5px; }
.as-pager .page-numbers.current { background: var(--as-brand); border-color: var(--as-brand); color: #fff !important; }
.as-pager a.page-numbers:hover { border-color: var(--as-brand); color: var(--as-brand) !important; }
.as-empty { text-align: center; padding: 60px 20px 90px; color: var(--as-muted); }
.as-empty h2 { margin: 12px 0 6px; font-size: 1.35rem; }

/* ==========================================================================
   8. Single document page
   ========================================================================== */

.as-theme.single-post .site-content > .ast-container { max-width: 940px; padding: 0 20px; margin: 0 auto; display: block; }
.as-theme.single-post #primary { margin: 28px 0 0; padding: 0; width: 100%; }
.as-theme.single-post .ast-article-single,
.as-theme.single-post .site-main > article {
  background: #fff; border: 1px solid var(--as-line); border-radius: var(--as-r-xl);
  padding: 34px 38px !important; box-shadow: var(--as-shadow-sm); margin-bottom: 8px;
}
.as-theme.single-post .entry-header { margin-bottom: 14px; text-align: left; }
.as-theme.single-post .entry-title { font-size: clamp(1.4rem, 1.1rem + 1.1vw, 2rem) !important; font-weight: 800 !important; line-height: 1.25 !important; }
.as-theme.single-post .entry-meta, .as-theme.single-post .entry-meta * { font-size: 13.5px; color: var(--as-muted) !important; }
.as-doc-head { margin: 0 0 22px; padding-bottom: 20px; border-bottom: 1px solid var(--as-line); }
.as-doc-title { font-size: clamp(1.45rem, 1.1rem + 1.3vw, 2.1rem); font-weight: 800; line-height: 1.2; margin: 6px 0 14px; }
.as-doc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.as-theme .entry-content { font-size: 16.5px; line-height: 1.75; color: var(--as-ink-2); }
.as-theme .entry-content > * { margin-bottom: 1.1em; }
.as-theme .entry-content h2 { font-size: 1.45rem; margin-top: 1.6em; }
.as-theme .entry-content h3 { font-size: 1.2rem; margin-top: 1.4em; }
.as-theme .entry-content img { border-radius: var(--as-r); }
.as-theme .entry-content table { border-collapse: collapse; width: 100%; font-size: 15px; }
.as-theme .entry-content th, .as-theme .entry-content td { border: 1px solid var(--as-line); padding: 10px 12px; }
.as-theme .entry-content th { background: var(--as-bg); }
.as-related { margin: 12px -20px 0; }
.as-related .as-shelf { padding-top: 28px; }
.as-related .as-wrap { padding: 0 20px; }

/* PDF viewer plugin: match the new design */
.as-theme .bams-outer-container { border-radius: var(--as-r-lg) !important; overflow: hidden; border: 1px solid var(--as-line) !important; box-shadow: none !important; }
.as-theme .bams-header { background: linear-gradient(135deg, var(--as-brand), var(--as-brand-700)) !important; }
.as-theme .bams-title { font-family: var(--as-font-head) !important; }
.as-theme .bams-pdf-viewer .bams-premium-button, .as-theme .bams-pdf-viewer .bams-promo-cta { background: var(--as-brand) !important; font-family: var(--as-font) !important; }
.as-theme .bams-gate-bar span { background: linear-gradient(90deg, var(--as-brand), var(--as-accent)) !important; }
.as-theme .bams-page-wrapper * { font-family: var(--as-font); }

/* Comments (wpDiscuz) */
.as-theme #comments, .as-theme .wpd-thread-wrapper { font-family: var(--as-font); }

/* Pages (Elementor landing pages etc.) */
.as-theme.page .site-content > .ast-container { max-width: var(--as-wrap); }

/* ==========================================================================
   9. Footer
   ========================================================================== */

.as-theme .site-footer, .as-theme .elementor-location-footer { display: none !important; }
.as-footer { margin-top: 64px; background: #0c1a15; color: rgba(255, 255, 255, .72); font-size: 14.5px; }
.as-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 40px; }
.as-footer__logo { height: 44px; width: auto; background: #fff; border-radius: 10px; padding: 6px 10px; margin-bottom: 16px; }
.as-footer__brand p { max-width: 380px; margin: 0 0 18px; line-height: 1.6; }
.as-footer__h { margin: 0 0 14px; color: #fff; font: 700 14px var(--as-font-head); letter-spacing: .02em; }
.as-footer__grid a:not(.as-btn) { display: block; padding: 5px 0; color: rgba(255, 255, 255, .72) !important; text-decoration: none !important; }
.as-footer__grid a:not(.as-btn):hover { color: #fff !important; }
.as-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 18px; padding-bottom: 26px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; color: rgba(255, 255, 255, .5); }

/* ==========================================================================
   10. Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .as-hero__grid { grid-template-columns: 1fr; gap: 8px; padding-top: 44px; padding-bottom: 40px; }
  .as-hero__art { height: 320px; max-width: 520px; width: 100%; margin: 0 auto; }
  .as-stack__doc { width: 180px; }
  .as-years { grid-template-columns: repeat(2, 1fr); }
  .as-tools { grid-template-columns: repeat(2, 1fr); }
  .as-premium { grid-template-columns: 1fr; padding: 32px; }
  .as-premium__cta { justify-self: start; }
  .as-footer__grid { grid-template-columns: 1fr 1fr; }
  .as-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .as-wrap { padding: 0 16px; }
  .as-section { padding: 40px 0; }
  .as-hero__grid { padding-top: 32px; }
  .as-hero__sub { font-size: 1rem; }
  .as-hero__search { padding-left: 14px; }
  .as-hero__search .as-btn { padding: 0 16px; }
  .as-hero__search input[type="search"] { font-size: 15px; }
  .as-hero__art { height: 250px; }
  .as-stack__doc { width: 140px; }
  .as-stack__doc--1 { left: 2%; top: 50px; }
  .as-stack__doc--2 { right: 2%; top: 50px; }
  .as-float { font-size: 12.5px; padding: 8px 10px; }
  .as-float--a { bottom: 6px; }
  .as-float--b { bottom: 40px; }
  .as-stats__grid { grid-template-columns: 1fr 1fr; }
  .as-stats__grid > div:nth-child(2) { border-right: 0; }
  .as-stats__grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--as-line); }
  .as-years { grid-template-columns: 1fr; gap: 12px; }
  .as-year { min-height: 0; flex-direction: row; align-items: center; padding: 16px; }
  .as-year__body small { display: none; }
  .as-year__count { margin: 0 0 0 auto; white-space: nowrap; }
  .as-shelf-row { grid-auto-columns: 140px; gap: 14px; }
  .as-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
  .as-subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .as-subject { padding: 10px; gap: 10px; min-width: 0; }
  .as-subject__ico { width: 32px; height: 32px; font-size: 14px; border-radius: 8px; }
  .as-subject__n { display: none; }
  .as-subject__txt strong { font-size: 13.5px; }
  .as-subject__txt small { font-size: 12px; }
  .as-year::after { width: 70px; height: 70px; right: -30px; top: -30px; }
  .as-year__body strong { font-size: 1rem; }
  .as-tools { grid-template-columns: 1fr; }
  .as-premium { padding: 26px 22px; }
  .as-sec-head { margin-bottom: 16px; }
  .as-theme.single-post .site-content > .ast-container { padding: 0 12px; }
  .as-theme.single-post .ast-article-single,
  .as-theme.single-post .site-main > article { padding: 22px 18px !important; border-radius: var(--as-r-lg); }
  .as-related { margin: 12px -12px 0; }
  .as-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; padding-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Page heading added by AyurSiddhi SEO on pages without an H1 (Elementor landing pages) */
.as-pagehead { max-width: var(--as-wrap); margin: 0 auto; padding: 26px 20px 8px; }
.as-pagehead__title { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.2rem); font-weight: 800; margin: 6px 0 0; letter-spacing: -0.02em; }
@media (max-width: 640px) { .as-pagehead { padding: 18px 16px 4px; } }
