/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */
/* =========================================================
   Enterprise / Premium Gutenberg UI (Blocksy + WP Blocks)
   - SAFE with Elementor templates (does not touch Elementor markup)
   - Scoped via parent class:
       A) body.jp-enterprise-gb   (recommended)
       B) .jp-enterprise-gb-scope (fallback: add to a Group block)
   ========================================================= */

/* ---------- Tokens (scoped) ---------- */
body.jp-enterprise-gb,
.jp-enterprise-gb-scope{
  --jp-font-sans: system-ui, -apple-system, "Segoe UI", Roboto,
    "Hiragino Kaku Gothic ProN","Hiragino Sans","Noto Sans JP","Yu Gothic","Meiryo", Arial, sans-serif;

  --jp-text: #0f172a;
  --jp-muted: #475569;
  --jp-border: #e5e7eb;
  --jp-bg: #ffffff;
  --jp-bg-soft: #f6f7f9;

  /* Enterprise width: not too narrow */
  --jp-maxw: 1040px;
  --jp-gutter: 24px;

  --jp-radius: 14px;

  --jp-fs-base: 16px;
  --jp-lh-base: 1.9;
  --jp-track: 0.02em;

  --jp-h1: clamp(22px, 2.0vw, 34px);
  --jp-h2: clamp(18px, 1.55vw, 24px);
  --jp-h3: clamp(16px, 1.35vw, 20px);

  --jp-s1: 8px;
  --jp-s2: 12px;
  --jp-s3: 16px;
  --jp-s4: 24px;
  --jp-s5: 32px;
  --jp-s6: 44px;
}

/* ---------- Page background (scoped) ---------- */
body.jp-enterprise-gb{
  background: var(--jp-bg-soft);
}
.jp-enterprise-gb-scope{
  /* if used inside content, keep it clean */
  background: transparent;
}

/* =========================================================
   1) Premium Page Title / Hero (scoped, safe)
   Only affects Blocksy hero title area (not Elementor sections)
   ========================================================= */
body.jp-enterprise-gb .site-main .hero-section.is-width-constrained,
.jp-enterprise-gb-scope .hero-section.is-width-constrained{
  max-width: var(--jp-maxw);
  margin-left: auto;
  margin-right: auto;
  padding: calc(var(--jp-s6) - 6px) var(--jp-gutter) var(--jp-s4);
}

body.jp-enterprise-gb .site-main .hero-section .entry-header,
.jp-enterprise-gb-scope .hero-section .entry-header{
  text-align: center;
}

body.jp-enterprise-gb .site-main .hero-section .page-title,
.jp-enterprise-gb-scope .hero-section .page-title{
  font-family: var(--jp-font-sans);
  font-size: var(--jp-h1);
  line-height: 1.25;
  letter-spacing: 0.01em;
  font-weight: 800;
  color: var(--jp-text);
  margin: 0;
  display: inline-block;
  padding-bottom: 10px;
  position: relative;
}

/* subtle premium underline */
body.jp-enterprise-gb .site-main .hero-section .page-title::after,
.jp-enterprise-gb-scope .hero-section .page-title::after{
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  background: rgba(15, 23, 42, 0.18);
  margin: 10px auto 0;
  border-radius: 999px;
}

/* =========================================================
   2) Gutenberg Content Card (scoped, does NOT touch Elementor)
   IMPORTANT: We style ONLY direct Gutenberg children,
   so Elementor containers inside entry-content are ignored.
   ========================================================= */

/* Card shell ONLY when you opt-in via body class */
body.jp-enterprise-gb .site-main article.page .entry-content.is-layout-constrained{
  max-width: var(--jp-maxw);
  margin: 0 auto var(--jp-s6);
  padding: clamp(18px, 2.2vw, 28px);
  background: var(--jp-bg);
  border: 1px solid var(--jp-border);
  border-radius: var(--jp-radius);
  box-shadow:
    0 1px 1px rgba(15, 23, 42, 0.03),
    0 12px 30px rgba(15, 23, 42, 0.06);
}

/* If you can’t add body class, wrap content with Group class:
   .jp-enterprise-gb-scope and it becomes the card */
.jp-enterprise-gb-scope{
  max-width: var(--jp-maxw);
  margin: 0 auto var(--jp-s6);
  padding: clamp(18px, 2.2vw, 28px);
  background: var(--jp-bg);
  border: 1px solid var(--jp-border);
  border-radius: var(--jp-radius);
  box-shadow:
    0 1px 1px rgba(15, 23, 42, 0.03),
    0 12px 30px rgba(15, 23, 42, 0.06);
}

/* Typography + width ONLY for Gutenberg-like direct children */
body.jp-enterprise-gb .entry-content.is-layout-constrained > :where(
  .wp-block-heading, .wp-block, p, ul, ol, table, blockquote, pre, hr
),
.jp-enterprise-gb-scope > :where(
  .wp-block-heading, .wp-block, p, ul, ol, table, blockquote, pre, hr
){
  font-family: var(--jp-font-sans);
  font-size: var(--jp-fs-base);
  line-height: var(--jp-lh-base);
  letter-spacing: var(--jp-track);
  color: var(--jp-text);
  box-sizing: border-box;
}

/* Reset weird block gaps (premium rhythm) */
body.jp-enterprise-gb .entry-content.is-layout-constrained > *{
  margin-top: 0;
}

/* Paragraph */
body.jp-enterprise-gb .entry-content.is-layout-constrained > p,
.jp-enterprise-gb-scope > p{
  margin: 0 0 var(--jp-s3);
  color: var(--jp-text);
  overflow-wrap: anywhere;
}

/* Lists */
body.jp-enterprise-gb .entry-content.is-layout-constrained > :where(ul, ol),
.jp-enterprise-gb-scope > :where(ul, ol){
  margin: 0 0 var(--jp-s3);
  padding-left: 1.35em;
}
body.jp-enterprise-gb .entry-content.is-layout-constrained > :where(ul, ol) li,
.jp-enterprise-gb-scope > :where(ul, ol) li{
  margin: 0 0 var(--jp-s1);
  color: var(--jp-text);
}

/* Links (keep professional) */
body.jp-enterprise-gb .entry-content.is-layout-constrained a,
.jp-enterprise-gb-scope a{
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: rgba(15, 23, 42, 0.28);
}
body.jp-enterprise-gb .entry-content.is-layout-constrained a:hover,
.jp-enterprise-gb-scope a:hover{
  text-decoration-color: rgba(15, 23, 42, 0.55);
}
body.jp-enterprise-gb .entry-content.is-layout-constrained a:focus-visible,
.jp-enterprise-gb-scope a:focus-visible{
  outline: 2px solid rgba(15, 23, 42, 0.45);
  outline-offset: 2px;
  border-radius: 6px;
}

/* =========================================================
   3) Headings (enterprise-grade hierarchy)
   ========================================================= */
body.jp-enterprise-gb .entry-content.is-layout-constrained > :where(h2.wp-block-heading, h2),
.jp-enterprise-gb-scope > :where(h2.wp-block-heading, h2){
  font-size: var(--jp-h2);
  line-height: 1.4;
  font-weight: 800;
  margin: var(--jp-s6) 0 var(--jp-s2);
  padding-bottom: var(--jp-s2);
  border-bottom: 1px solid var(--jp-border);
  color: var(--jp-text);
}

body.jp-enterprise-gb .entry-content.is-layout-constrained > :where(h3.wp-block-heading, h3),
.jp-enterprise-gb-scope > :where(h3.wp-block-heading, h3){
  font-size: var(--jp-h3);
  line-height: 1.5;
  font-weight: 800;
  margin: var(--jp-s4) 0 var(--jp-s2);
  padding-left: 12px;
  border-left: 3px solid rgba(15, 23, 42, 0.18);
  color: var(--jp-text);
}

/* First H2 should not feel “detached” */
body.jp-enterprise-gb .entry-content.is-layout-constrained > :where(h2.wp-block-heading, h2):first-child,
.jp-enterprise-gb-scope > :where(h2.wp-block-heading, h2):first-child{
  margin-top: 0;
}

/* Optional: small labels under headings (if present) */
body.jp-enterprise-gb .entry-content.is-layout-constrained :where(.has-small-font-size, small),
.jp-enterprise-gb-scope :where(.has-small-font-size, small){
  color: var(--jp-muted);
}

/* =========================================================
   4) Tables / Quotes / Code (clean corporate)
   ========================================================= */
body.jp-enterprise-gb .entry-content.is-layout-constrained > table,
.jp-enterprise-gb-scope > table{
  width: 100%;
  border-collapse: collapse;
  margin: var(--jp-s4) 0;
  font-size: 0.95em;
}

body.jp-enterprise-gb .entry-content.is-layout-constrained > table :where(th, td),
.jp-enterprise-gb-scope > table :where(th, td){
  border: 1px solid var(--jp-border);
  padding: 10px 12px;
  vertical-align: top;
}

body.jp-enterprise-gb .entry-content.is-layout-constrained > table th,
.jp-enterprise-gb-scope > table th{
  background: #f8fafc;
  font-weight: 800;
  color: var(--jp-text);
}

body.jp-enterprise-gb .entry-content.is-layout-constrained > blockquote,
.jp-enterprise-gb-scope > blockquote{
  margin: var(--jp-s4) 0;
  padding: var(--jp-s3) var(--jp-s4);
  border-left: 4px solid rgba(15, 23, 42, 0.16);
  background: #f8fafc;
  border-radius: 12px;
  color: var(--jp-text);
}

body.jp-enterprise-gb .entry-content.is-layout-constrained > pre,
.jp-enterprise-gb-scope > pre{
  margin: var(--jp-s4) 0;
  padding: var(--jp-s3);
  border: 1px solid var(--jp-border);
  border-radius: 12px;
  background: #f8fafc;
  overflow: auto;
}

/* Media responsive */
body.jp-enterprise-gb .entry-content.is-layout-constrained :where(img, video, iframe),
.jp-enterprise-gb-scope :where(img, video, iframe){
  max-width: 100%;
  height: auto;
}

/* =========================================================
   5) Mobile tune
   ========================================================= */
@media (max-width: 768px){
  body.jp-enterprise-gb,
  .jp-enterprise-gb-scope{
    --jp-gutter: 16px;
  }

  body.jp-enterprise-gb .site-main .hero-section.is-width-constrained,
  .jp-enterprise-gb-scope .hero-section.is-width-constrained{
    padding: 30px var(--jp-gutter) 14px;
  }

  body.jp-enterprise-gb .site-main article.page .entry-content.is-layout-constrained,
  .jp-enterprise-gb-scope{
    padding: 16px;
    border-radius: 12px;
  }

  body.jp-enterprise-gb .entry-content.is-layout-constrained > :where(h2.wp-block-heading, h2),
  .jp-enterprise-gb-scope > :where(h2.wp-block-heading, h2){
    margin-top: 30px;
  }
}

/* Print */
@media print{
  body.jp-enterprise-gb .site-main article.page .entry-content.is-layout-constrained,
  .jp-enterprise-gb-scope{
    box-shadow: none;
    border: none;
    padding: 0;
  }
}