/* ============================================================
   eStudyHindi Design Kit — style.css
   Phase 1: :root CSS Variables (Teal / Navy Blue theme)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;600&display=swap');

/* ─────────────────────────────────────────
   :root  Design Tokens
───────────────────────────────────────── */
:root {
  /* Brand colours */
  --esth-primary:        #0d9488;   /* Teal 600 */
  --esth-primary-dark:   #0f766e;   /* Teal 700 */
  --esth-primary-light:  #2dd4bf;   /* Teal 400 */
  --esth-navy:           #0f172a;   /* Slate 900 */
  --esth-navy-mid:       #1e293b;   /* Slate 800 */
  --esth-navy-soft:      #134e4a;   /* Teal 900 */

  /* Surface & text */
  --esth-surface:        #ffffff;
  --esth-surface-soft:   #f8fafc;
  --esth-border:         #e2e8f0;
  --esth-text-primary:   #0f172a;
  --esth-text-muted:     #64748b;
  --esth-text-light:     #94a3b8;

  /* Feedback tints */
  --esth-teal-tint:      #ccfbf1;
  --esth-teal-tint-text: #0f766e;

  /* Spacing scale */
  --esth-radius-sm:  8px;
  --esth-radius-md:  12px;
  --esth-radius-lg:  16px;
  --esth-radius-xl:  20px;
  --esth-radius-pill:999px;

  /* Shadows */
  --esth-shadow-card:  0 2px 12px rgba(15,23,42,.08);
  --esth-shadow-hover: 0 10px 36px rgba(13,148,136,.18);
  --esth-shadow-hero:  0 8px 40px rgba(0,0,0,.35);

  /* Transitions */
  --esth-trans: .22s ease;

  /* Typography */
  --esth-font-display: 'Sora', sans-serif;
  --esth-font-body:    'DM Sans', sans-serif;
}

/* ─────────────────────────────────────────
   Global Reset (scoped to plugin wrapper)
───────────────────────────────────────── */
.esth-wrap,
.esth-wrap * {
  box-sizing: border-box;
  margin: 0; padding: 0;
}
.esth-wrap {
  font-family: var(--esth-font-body);
  color: var(--esth-text-primary);
  line-height: 1.65;
  overflow-x: hidden;
}
.esth-wrap a { text-decoration: none; }
.esth-wrap img { max-width: 100%; display: block; }

/* ─────────────────────────────────────────
   Container
───────────────────────────────────────── */
.esth-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ═══════════════════════════════════════════════════
   PHASE 3 — HERO SECTION
═══════════════════════════════════════════════════ */
.esth-hero {
  position: relative;
  background: linear-gradient(
    140deg,
    var(--esth-navy)     0%,
    var(--esth-navy-soft) 55%,
    var(--esth-navy)     100%
  );
  padding: 90px 24px 110px;
  text-align: center;
  overflow: hidden;
}

/* ── Ambient Orbs ── */
.esth-hero__orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.esth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .3;
}
.esth-orb--1 {
  width: 480px; height: 480px;
  background: var(--esth-primary);
  top: -160px; left: -140px;
  animation: esth-float 8s ease-in-out infinite alternate;
}
.esth-orb--2 {
  width: 320px; height: 320px;
  background: var(--esth-primary-light);
  bottom: -100px; right: -80px;
  animation: esth-float 10s ease-in-out 1s infinite alternate-reverse;
}
.esth-orb--3 {
  width: 240px; height: 240px;
  background: #0e7490;
  top: 55%; left: 42%;
  animation: esth-float 12s ease-in-out 2s infinite alternate;
}
@keyframes esth-float {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(20px, -20px) scale(1.08); }
}

/* ── Inner content ── */
.esth-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 740px;
  margin: 0 auto;
}

/* Badge pill */
.esth-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  color: #99f6e4;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .4px;
  padding: 7px 20px;
  border-radius: var(--esth-radius-pill);
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.esth-badge__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--esth-primary-light);
  flex-shrink: 0;
  animation: esth-pulse 2s ease-in-out infinite;
}
@keyframes esth-pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .5; transform: scale(1.5); }
}

/* Heading */
.esth-hero__title {
  font-family: var(--esth-font-display);
  font-size: clamp(2rem, 4.8vw, 3.4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.18;
  margin-bottom: 40px;
  /* Subtle shimmer underline on highlight */
}
.esth-hero__title em {
  font-style: normal;
  background: linear-gradient(90deg, var(--esth-primary-light), var(--esth-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Search bar ── */
.esth-search__wrap {
  display: flex;
  align-items: center;
  background: var(--esth-surface);
  border-radius: var(--esth-radius-lg);
  padding: 6px 6px 6px 20px;
  box-shadow: var(--esth-shadow-hero);
  gap: 10px;
}
.esth-search__icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  color: var(--esth-text-light);
  display: flex; align-items: center;
}
.esth-search__icon svg { width: 100%; height: 100%; }

.esth-search__input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--esth-font-body);
  font-size: 1rem;
  color: var(--esth-text-primary);
  background: transparent;
  min-width: 0;
}
.esth-search__input::placeholder { color: var(--esth-text-light); }

.esth-search__btn {
  flex-shrink: 0;
  background: var(--esth-primary);
  color: #fff;
  border: none;
  border-radius: var(--esth-radius-sm);
  padding: 12px 26px;
  font-family: var(--esth-font-display);
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--esth-trans), transform var(--esth-trans);
  white-space: nowrap;
}
.esth-search__btn:hover,
.esth-search__btn:focus-visible {
  background: var(--esth-primary-dark);
  transform: translateY(-1px);
}

/* ── Stats bar ── */
.esth-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 40px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--esth-radius-xl);
  padding: 20px 40px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.esth-stats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 32px;
}
.esth-stats__item strong {
  font-family: var(--esth-font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--esth-primary-light);
  line-height: 1;
}
.esth-stats__item span {
  font-size: .78rem;
  color: var(--esth-text-light);
  margin-top: 4px;
  letter-spacing: .3px;
}
.esth-stats__sep {
  width: 1px; height: 44px;
  background: rgba(255,255,255,.15);
}

/* ═══════════════════════════════════════════════════
   SHARED SECTION STYLES
═══════════════════════════════════════════════════ */
.esth-section {
  padding: 68px 0;
}
.esth-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
}
.esth-section__head--center {
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.esth-section__title {
  font-family: var(--esth-font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--esth-text-primary);
  position: relative;
}
/* Accent underline for centered titles */
.esth-section__head--center .esth-section__title::after {
  content: '';
  display: block;
  width: 48px; height: 4px;
  background: var(--esth-primary);
  border-radius: 2px;
  margin: 10px auto 0;
}
.esth-see-all {
  font-size: .88rem;
  font-weight: 700;
  color: var(--esth-primary);
  white-space: nowrap;
  transition: color var(--esth-trans);
}
.esth-see-all:hover { color: var(--esth-primary-dark); }

/* ═══════════════════════════════════════════════════
   PHASE 4 — GRID  (base only)
   Responsive columns: PHP scoped <style> tag se inject hoti hain.
═══════════════════════════════════════════════════ */
.esth-grid {
  display: grid;
  align-items: start;
  grid-auto-flow: row;
}
.esth-grid > p,
.esth-grid > p:empty,
.esth-grid > br {
  display: none !important;
}

/* ═══════════════════════════════════════════════════
   PHASE 4 — COURSE CARD
═══════════════════════════════════════════════════ */
.esth-course-card {
  background: var(--esth-surface);
  border: 2px solid var(--esth-border);
  border-radius: var(--esth-radius-lg);
  padding: 26px 16px 22px;
  text-align: center;
  cursor: pointer;
  transition:
    transform     var(--esth-trans),
    box-shadow    var(--esth-trans),
    border-color  var(--esth-trans),
    background    var(--esth-trans);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Hover & Active state */
.esth-course-card:hover,
.esth-course-card--active {
  background: var(--esth-primary);
  border-color: var(--esth-primary);
  box-shadow: var(--esth-shadow-hover);
  transform: translateY(-5px);
}

/* Icon container */
.esth-course-card__icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
}
.esth-course-card__icon-img {
  width: 100%; height: 100%;
  object-fit: contain;
}
/* SVG fallback inherits colours */
.esth-course-card:hover    .esth-course-card__icon svg rect:first-child,
.esth-course-card--active  .esth-course-card__icon svg rect:first-child {
  fill: rgba(255,255,255,.25);
}

/* Title */
.esth-course-card__title {
  font-family: var(--esth-font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--esth-text-primary);
  transition: color var(--esth-trans);
}
.esth-course-card:hover    .esth-course-card__title,
.esth-course-card--active  .esth-course-card__title {
  color: #fff;
}

/* Button */
.esth-course-card__btn {
  display: inline-block;
  background: var(--esth-primary);
  color: #fff;
  font-family: var(--esth-font-display);
  font-size: .82rem;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: var(--esth-radius-sm);
  margin-top: 4px;
  transition: background var(--esth-trans), transform var(--esth-trans);
}
.esth-course-card:hover    .esth-course-card__btn,
.esth-course-card--active  .esth-course-card__btn {
  background: rgba(0,0,0,.22);
}
.esth-course-card__btn:hover { transform: scale(1.05); }

/* ═══════════════════════════════════════════════════
   PHASE 5 — PDF CARD
═══════════════════════════════════════════════════ */
.esth-pdf-card {
  background: var(--esth-surface-soft);
  border: 1.5px solid var(--esth-border);
  border-radius: var(--esth-radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition:
    transform    var(--esth-trans),
    box-shadow   var(--esth-trans),
    border-color var(--esth-trans);
}
.esth-pdf-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--esth-shadow-hover);
  border-color: var(--esth-primary);
}

/* Top row: icon + badge */
.esth-pdf-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

/* Icon */
.esth-pdf-card__icon {
  width: 40px; height: 48px;
  flex-shrink: 0;
}
.esth-pdf-card__icon-img {
  width: 100%; height: 100%;
  object-fit: contain;
}

/* Date badge */
.esth-pdf-card__badge {
  font-size: .72rem;
  font-weight: 700;
  color: var(--esth-teal-tint-text);
  background: var(--esth-teal-tint);
  padding: 4px 12px;
  border-radius: var(--esth-radius-pill);
  white-space: nowrap;
  align-self: flex-start;
}

/* Title */
.esth-pdf-card__title {
  font-family: var(--esth-font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--esth-text-primary);
  line-height: 1.4;
  margin-bottom: 16px;
  flex-grow: 1;
}

/* Download button */
.esth-pdf-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--esth-primary);
  color: #fff;
  font-family: var(--esth-font-display);
  font-size: .82rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--esth-radius-sm);
  transition: background var(--esth-trans), transform var(--esth-trans);
  align-self: flex-start;
}
.esth-pdf-card__btn:hover,
.esth-pdf-card__btn:focus-visible {
  background: var(--esth-primary-dark);
  transform: scale(1.04);
}

/* ═══════════════════════════════════════════════════
   FEATURES STRIP
═══════════════════════════════════════════════════ */
.esth-features {
  background: linear-gradient(140deg, var(--esth-navy) 0%, var(--esth-navy-soft) 100%);
  padding: 64px 24px;
}
.esth-features__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1120px;
  margin: 0 auto;
}
.esth-feature {
  text-align: center;
  padding: 32px 20px;
  border-radius: var(--esth-radius-lg);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  transition: background var(--esth-trans), transform var(--esth-trans);
}
.esth-feature:hover {
  background: rgba(13,148,136,.20);
  transform: translateY(-5px);
}
.esth-feature__icon {
  font-size: 2.4rem;
  margin-bottom: 14px;
  line-height: 1;
}
.esth-feature h4 {
  font-family: var(--esth-font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #f0fdf4;
  margin-bottom: 8px;
}
.esth-feature p {
  font-size: .84rem;
  color: var(--esth-text-light);
  line-height: 1.55;
}

/* ═══════════════════════════════════════════════════
   PHASE 5 — RESPONSIVE BREAKPOINTS
═══════════════════════════════════════════════════ */

/* Tablet — 768px */
@media (max-width: 768px) {
  .esth-hero         { padding: 70px 16px 90px; }
  .esth-stats        { padding: 16px 20px; }
  .esth-stats__item  { padding: 0 20px; }
  .esth-stats__sep   { height: 32px; }
  .esth-features__grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile — 540px */
@media (max-width: 540px) {
  .esth-hero__title  { font-size: 1.9rem; }
  .esth-search__btn  { padding: 10px 16px; font-size: .82rem; }
  .esth-stats        { gap: 8px; padding: 14px 16px; }
  .esth-stats__item  { padding: 0 12px; }
  .esth-stats__sep   { display: none; }
  .esth-features__grid { grid-template-columns: 1fr 1fr; }
}

/* Extra-small — 360px */
@media (max-width: 360px) {
  .esth-features__grid { grid-template-columns: 1fr; }
}
