/* ============================================================
   ESSE INDIA — EDITOR-CONTENT.CSS
   Gutenberg editor + frontend single-post content styling
   Loads on: (1) frontend single.php post content
             (2) Gutenberg editor backend (via add_editor_style)
   ============================================================ */

/* ============================================================
   1. CONTENT WRAPPER
   ============================================================ */
.post-content,
.editor-styles-wrapper {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17.5px;
  line-height: 1.9;
  color: #262233;
  word-wrap: break-word;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.post-content > *:first-child,
.editor-styles-wrapper > *:first-child { margin-top: 0; }
.post-content > *:last-child,
.editor-styles-wrapper > *:last-child { margin-bottom: 0; }

/* ============================================================
   2. HEADINGS
   ============================================================ */
.post-content h1, .editor-styles-wrapper h1,
.post-content h2, .editor-styles-wrapper h2,
.post-content h3, .editor-styles-wrapper h3,
.post-content h4, .editor-styles-wrapper h4,
.post-content h5, .editor-styles-wrapper h5,
.post-content h6, .editor-styles-wrapper h6 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 600;
  color: #1a0d3d;
  line-height: 1.25;
  letter-spacing: -.01em;
  margin-top: 1.8em;
  margin-bottom: .6em;
}
.post-content h1, .editor-styles-wrapper h1 { font-size: 2.2em; }
.post-content h2, .editor-styles-wrapper h2 {
  font-size: 1.6em;
  padding-bottom: .4em;
  border-bottom: 1px solid #ece8f6;
}
.post-content h3, .editor-styles-wrapper h3 { font-size: 1.3em; }
.post-content h4, .editor-styles-wrapper h4 { font-size: 1.15em; }
.post-content h5, .editor-styles-wrapper h5 {
  font-size: 1em;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #4b21c4;
}
.post-content h6, .editor-styles-wrapper h6 {
  font-size: .9em;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #6a35e6;
}

/* ============================================================
   3. PARAGRAPHS
   ============================================================ */
.post-content p, .editor-styles-wrapper p { margin: 0 0 1.2em; }
.post-content p:last-child,
.editor-styles-wrapper p:last-child { margin-bottom: 0; }

/* Drop cap */
.post-content .has-drop-cap::first-letter,
.editor-styles-wrapper .has-drop-cap::first-letter {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 3.8em;
  font-weight: 600;
  line-height: .85;
  float: left;
  margin: .08em .12em 0 0;
  color: #4b21c4;
}

/* ============================================================
   4. LINKS
   ============================================================ */
.post-content a, .editor-styles-wrapper a {
  color: #4b21c4;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color .2s ease, text-decoration-thickness .2s ease;
}
.post-content a:hover, .editor-styles-wrapper a:hover {
  color: #321a7a;
  text-decoration-thickness: 2px;
}

/* ============================================================
   5. LISTS (default)
   ============================================================ */
.post-content ul, .editor-styles-wrapper ul,
.post-content ol, .editor-styles-wrapper ol {
  margin: 1em 0 1.2em 1.5em;
  padding-left: 0;
}
.post-content ul, .editor-styles-wrapper ul { list-style: disc; }
.post-content ul ul, .editor-styles-wrapper ul ul { list-style: circle; }
.post-content ul ul ul, .editor-styles-wrapper ul ul ul { list-style: square; }
.post-content ol, .editor-styles-wrapper ol { list-style: decimal; }
.post-content ol ol, .editor-styles-wrapper ol ol { list-style: lower-alpha; }
.post-content li, .editor-styles-wrapper li {
  margin-bottom: .5em;
  padding-left: .3em;
}
.post-content li:last-child,
.editor-styles-wrapper li:last-child { margin-bottom: 0; }
.post-content li::marker,
.editor-styles-wrapper li::marker {
  color: #6a35e6;
  font-weight: 600;
}

/* ============================================================
   6. BLOCKQUOTE
   ============================================================ */
.post-content blockquote, .editor-styles-wrapper blockquote {
  border-left: 4px solid #6a35e6;
  padding: 18px 24px;
  margin: 1.6em 0;
  background: #f8f6fd;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  font-size: 1.05em;
  color: #3a3350;
  position: relative;
}
.post-content blockquote p,
.editor-styles-wrapper blockquote p { margin-bottom: .6em; }
.post-content blockquote p:last-child,
.editor-styles-wrapper blockquote p:last-child { margin-bottom: 0; }
.post-content blockquote cite,
.editor-styles-wrapper blockquote cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-size: .85em;
  font-weight: 600;
  color: #6a35e6;
}

/* ============================================================
   7. CODE
   ============================================================ */
.post-content code, .editor-styles-wrapper code {
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: .9em;
  background: #f1ecfc;
  color: #4b21c4;
  padding: 2px 8px;
  border-radius: 5px;
}
.post-content pre, .editor-styles-wrapper pre {
  background: #1a0d3d;
  color: #e2d5fc;
  padding: 20px 24px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 1.6em 0;
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.6;
  -webkit-overflow-scrolling: touch;
}
.post-content pre code,
.editor-styles-wrapper pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

/* ============================================================
   8. IMAGES
   ============================================================ */
.post-content img, .editor-styles-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.4em 0;
  display: block;
}
.post-content .alignleft, .editor-styles-wrapper .alignleft {
  float: left;
  margin: .4em 1.6em 1em 0;
  max-width: 50%;
}
.post-content .alignright, .editor-styles-wrapper .alignright {
  float: right;
  margin: .4em 0 1em 1.6em;
  max-width: 50%;
}
.post-content .aligncenter, .editor-styles-wrapper .aligncenter {
  display: block;
  margin: 1.4em auto;
}
.post-content .alignwide, .editor-styles-wrapper .alignwide {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.post-content .alignfull, .editor-styles-wrapper .alignfull {
  max-width: none;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  border-radius: 0;
}
.post-content figure, .editor-styles-wrapper figure {
  margin: 1.4em 0;
  max-width: 100%;
}
.post-content figure img,
.editor-styles-wrapper figure img { margin: 0; }
.post-content figcaption, .editor-styles-wrapper figcaption {
  font-size: 13.5px;
  color: #6b7280;
  text-align: center;
  margin-top: 10px;
  line-height: 1.55;
  font-style: italic;
}
.post-content::after, .editor-styles-wrapper::after {
  content: '';
  display: table;
  clear: both;
}

/* ============================================================
   9. GALLERY
   ============================================================ */
.post-content .wp-block-gallery,
.editor-styles-wrapper .wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 1.6em 0;
  list-style: none;
  padding: 0;
}
.post-content .wp-block-gallery .wp-block-image,
.editor-styles-wrapper .wp-block-gallery .wp-block-image { margin: 0; }
.post-content .wp-block-gallery img,
.editor-styles-wrapper .wp-block-gallery img {
  margin: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* ============================================================
   10. TABLES
   ============================================================ */
.post-content table, .editor-styles-wrapper table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 15px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
  border: 1px solid #e8e8e8;
  background: #fff;
}
.post-content table th, .editor-styles-wrapper table th {
  background: linear-gradient(135deg, #1a0d3d, #4b21c4);
  color: #fff;
  font-weight: 600;
  padding: 14px 20px;
  text-align: left;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.post-content table td, .editor-styles-wrapper table td {
  padding: 12px 20px;
  border: 1px solid #e8e8e8;
  vertical-align: top;
  background: #fff;
  color: #262233;
}
.post-content table tbody tr:nth-child(even) td,
.editor-styles-wrapper table tbody tr:nth-child(even) td { background: #f8f6fd; }
.post-content table tbody tr:hover td,
.editor-styles-wrapper table tbody tr:hover td {
  background: #f0ebff;
  transition: .2s;
}
.post-content table caption,
.editor-styles-wrapper table caption {
  font-size: 13.5px;
  color: #6b7280;
  margin-bottom: 8px;
  text-align: left;
  font-style: italic;
}

/* ============================================================
   11. HORIZONTAL RULES
   ============================================================ */
.post-content hr, .editor-styles-wrapper hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ece8f6 30%, #ece8f6 70%, transparent);
  margin: 2.4em 0;
}
.post-content .wp-block-separator,
.editor-styles-wrapper .wp-block-separator {
  border: none;
  height: 3px;
  background: linear-gradient(90deg, #6a35e6, #d97706);
  border-radius: 3px;
  max-width: 100px;
  margin: 2.4em auto;
}
.post-content .wp-block-separator.is-style-dots,
.editor-styles-wrapper .wp-block-separator.is-style-dots {
  background: none;
  height: auto;
  text-align: center;
  color: #6a35e6;
  font-size: 22px;
  letter-spacing: 12px;
  max-width: none;
}
.post-content .wp-block-separator.is-style-dots::before,
.editor-styles-wrapper .wp-block-separator.is-style-dots::before {
  content: '···';
}

/* ============================================================
   12. BUTTONS
   ============================================================ */
.post-content .wp-block-button__link,
.editor-styles-wrapper .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #6a35e6, #321a7a);
  color: #fff;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 10px 22px -10px rgba(75, 33, 196, .55);
}
.post-content .wp-block-button__link:hover,
.editor-styles-wrapper .wp-block-button__link:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px -10px rgba(75, 33, 196, .6);
  color: #fff;
}
.post-content .wp-block-button.is-style-outline .wp-block-button__link,
.editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  color: #6a35e6;
  border: 2px solid #6a35e6;
  box-shadow: none;
}
.post-content .wp-block-button.is-style-outline .wp-block-button__link:hover,
.editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: #f1ecfc;
  color: #4b21c4;
}

/* ============================================================
   13. COVER / MEDIA-TEXT / COLUMNS
   ============================================================ */
.post-content .wp-block-cover,
.editor-styles-wrapper .wp-block-cover {
  border-radius: 16px;
  overflow: hidden;
  margin: 1.8em 0;
  padding: 60px 40px;
  min-height: 320px;
}
.post-content .wp-block-cover__inner-container,
.editor-styles-wrapper .wp-block-cover__inner-container {
  max-width: 640px;
  color: #fff;
}
.post-content .wp-block-media-text,
.editor-styles-wrapper .wp-block-media-text {
  margin: 1.8em 0;
  gap: 32px;
  align-items: center;
}
.post-content .wp-block-columns,
.editor-styles-wrapper .wp-block-columns {
  display: flex;
  gap: 28px;
  margin: 1.6em 0;
}
.post-content .wp-block-column,
.editor-styles-wrapper .wp-block-column { flex: 1; }
@media (max-width: 768px) {
  .post-content .wp-block-columns,
  .editor-styles-wrapper .wp-block-columns { flex-direction: column; gap: 0; }
}

/* ============================================================
   14. EMBEDS
   ============================================================ */
.post-content .wp-block-embed,
.editor-styles-wrapper .wp-block-embed { margin: 1.8em 0; }
.post-content .wp-block-embed__wrapper,
.editor-styles-wrapper .wp-block-embed__wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 8px 24px -10px rgba(26, 13, 61, .25);
}
.post-content .wp-block-embed__wrapper iframe,
.editor-styles-wrapper .wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
  border-radius: 14px;
}

/* ============================================================
   15. CALLOUT BOXES (custom)
   ============================================================ */
.post-content .callout,
.editor-styles-wrapper .callout {
  background: #f8f6fd;
  border-left: 4px solid #6a35e6;
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 1.6em 0;
  font-size: 15.5px;
  line-height: 1.75;
}
.post-content .callout strong,
.editor-styles-wrapper .callout strong {
  color: #4b21c4;
  display: block;
  margin-bottom: 6px;
}
.post-content .callout.warning,
.editor-styles-wrapper .callout.warning {
  background: #fff7e6;
  border-left-color: #f5b400;
}
.post-content .callout.warning strong { color: #b8860b; }
.post-content .callout.success,
.editor-styles-wrapper .callout.success {
  background: #e8f8ee;
  border-left-color: #10b981;
}
.post-content .callout.success strong { color: #146c3c; }

/* ============================================================
   16. KEY TAKEAWAY BOX
   ============================================================ */
.post-content .key-takeaway,
.editor-styles-wrapper .key-takeaway {
  background: linear-gradient(150deg, #1a0d3d, #4b21c4);
  color: #fff;
  border-radius: 16px;
  padding: 28px 30px;
  margin: 2em 0;
}
.post-content .key-takeaway h4,
.editor-styles-wrapper .key-takeaway h4 {
  color: #ffd76b;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin: 0 0 14px;
}
.post-content .key-takeaway ul,
.editor-styles-wrapper .key-takeaway ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.post-content .key-takeaway li,
.editor-styles-wrapper .key-takeaway li {
  padding: 6px 0 6px 26px;
  position: relative;
  color: rgba(255, 255, 255, .92);
  font-size: 15px;
  line-height: 1.6;
}
.post-content .key-takeaway li::before,
.editor-styles-wrapper .key-takeaway li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 8px;
  color: #ffd76b;
  font-size: 12px;
}

/* ============================================================
   17. TEXT FORMATTING
   ============================================================ */
.post-content strong, .editor-styles-wrapper strong {
  font-weight: 700;
  color: #1a0d3d;
}
.post-content em, .editor-styles-wrapper em { font-style: italic; }
.post-content mark, .editor-styles-wrapper mark {
  background: linear-gradient(180deg, transparent 55%, #ffd76b 55%);
  color: inherit;
  padding: 0 2px;
}
.post-content abbr[title],
.editor-styles-wrapper abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

/* ============================================================
   18. BLOG FAQ — Premium Q&A Cards
   ============================================================ */

/* FAQ heading with icon (when followed by .blog-faq or ul) */
.post-content h2:has(+ .blog-faq),
.post-content h2:has(+ ul.blog-faq),
.post-content h3:has(+ .blog-faq),
.post-content h3:has(+ ul.blog-faq) {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 26px;
  font-weight: 800;
  color: var(--ink, #150c2e);
  padding-bottom: 16px;
  border-bottom: 2px solid #f1ecfc;
  margin: 48px 0 24px;
}
.post-content h2:has(+ .blog-faq)::before,
.post-content h3:has(+ .blog-faq)::before {
  content: '\f059';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6a35e6, #321a7a);
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 10px 20px -8px rgba(75, 33, 196, .5);
}

/* FAQ container */
.blog-faq {
  margin: 0 0 32px;
}
.blog-faq ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.blog-faq ul li {
  position: relative;
  background: #fff;
  border: 1.5px solid #f1ecfc;
  border-radius: 14px;
  padding: 18px 22px 18px 54px;
  font-size: 15.5px;
  font-weight: 600;
  color: #150c2e;
  line-height: 1.5;
  transition: all .25s ease;
  cursor: default;
}
.blog-faq ul li::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid #6a35e6;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  transition: transform .25s ease;
}
.blog-faq ul li:hover {
  border-color: #8b5cf6;
  background: linear-gradient(135deg, #fff, #f8f6fd);
  transform: translateX(4px);
  box-shadow: 0 10px 30px -14px rgba(75, 33, 196, .25);
}
.blog-faq ul li:hover::before {
  transform: translateY(-50%) translateX(2px);
  border-left-color: #4b21c4;
}
.blog-faq ul li strong {
  color: #150c2e;
  font-weight: 700;
}

/* FAQ answer paragraphs (styled as info boxes) */
.blog-faq > p {
  background: #f8f6fd;
  border-left: 4px solid #6a35e6;
  padding: 14px 20px;
  border-radius: 0 12px 12px 0;
  margin: 6px 0 14px;
  color: #6d6d80;
  font-size: 14.5px;
  line-height: 1.7;
}

/* ============================================================
   19. RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) and (min-width: 641px) {
  .post-content table th,
  .post-content table td,
  .editor-styles-wrapper table th,
  .editor-styles-wrapper table td {
    padding: 10px 16px;
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  .post-content, .editor-styles-wrapper {
    font-size: 16.5px;
    line-height: 1.85;
  }
  .post-content h1, .editor-styles-wrapper h1 { font-size: 1.8em; }
  .post-content h2, .editor-styles-wrapper h2 { font-size: 1.4em; }
  .post-content h3, .editor-styles-wrapper h3 { font-size: 1.2em; }

  /* Tables scrollable */
  .post-content table, .editor-styles-wrapper table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    border-radius: 12px;
  }
  .post-content table th, .editor-styles-wrapper table th,
  .post-content table td, .editor-styles-wrapper table td {
    padding: 10px 14px;
    font-size: 13px;
    white-space: nowrap;
  }

  /* Floats full width */
  .post-content .alignleft, .editor-styles-wrapper .alignleft,
  .post-content .alignright, .editor-styles-wrapper .alignright {
    float: none;
    max-width: 100%;
    margin: 1.4em 0;
  }
  .post-content a, .editor-styles-wrapper a { text-underline-offset: 2px; }
  .post-content blockquote, .editor-styles-wrapper blockquote {
    padding: 16px 18px;
    font-size: 1em;
  }

  /* FAQ mobile */
  .post-content h2:has(+ .blog-faq) {
    font-size: 22px;
  }
  .post-content h2:has(+ .blog-faq)::before {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  .blog-faq ul li {
    padding: 16px 18px 16px 46px;
    font-size: 14.5px;
  }
  .blog-faq ul li::before {
    left: 18px;
  }
}

/* ============================================================
   20. REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .post-content a, .editor-styles-wrapper a,
  .post-content table tbody tr:hover td,
  .editor-styles-wrapper table tbody tr:hover td,
  .post-content .wp-block-button__link,
  .editor-styles-wrapper .wp-block-button__link,
  .blog-faq ul li,
  .blog-faq ul li::before {
    transition: none !important;
  }
}