/*
 * LG Kids — Design System
 * CSS Custom Properties (variables), base typography, utilities
 * Prefix: lgk-
 */

/* ─── Global: prevent horizontal scroll từ full-bleed blocks ───────────────*/
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  background-color: var(--lgk-cream);
}

/* ─── Bỏ padding-top của page-wrapper ──────────────────────────────────────*/
.page-wrapper {
  padding-top: 0 !important;
}

/* ─── Bù trừ header sticky khi jump tới anchor (VD: /#contact) ─────────────*/
#contact {
  scroll-margin-top: 90px;
}

/* Nền các section đồng bộ với nền trang */
#wrapper,
#main,
.main-container,
.page-wrapper,
.row-main,
.row-main > .col,
.row-main > .col > .col-inner {
  background-color: var(--lgk-cream) !important;
}

/* ─── Tắt Magnific Popup trigger từ menu links dùng href="#" ────────────── */
.mfp-s-error .mfp-content {
  display: none !important;
}
.mfp-s-error.mfp-bg {
  display: none !important;
}
.mfp-s-error .mfp-wrap {
  display: none !important;
}

/* ─── Color Palette ─────────────────────────────────────────────────────── */
:root {
  /* Blues */
  --lgk-blue-900:  #233CB2;  /* Primary dark blue */
  --lgk-blue-500:  #3FB7FE;  /* Medium blue */
  --lgk-blue-300:  #7BD4FE;  /* Light blue */
  --lgk-blue-100:  #BBECFD;  /* Lightest blue */

  /* Pinks */
  --lgk-pink-700:  #FE2D9B;  /* Dark pink / accent */
  --lgk-pink-400:  #FE7DD2;  /* Light pink */

  /* Neutrals */
  --lgk-cream:     #FFFFFF;  /* Background warm cream */
  --lgk-white:     #FFFFFF;
  --lgk-text:      #1A1A2E;  /* Near-black for body text */
  --lgk-text-muted: #6B7280;

  /* ─── Typography ──────────────────────────────────────────────────────── */
  --lgk-font:      'Nunito', sans-serif;

  --lgk-size-xs:   0.75rem;   /* 12px */
  --lgk-size-sm:   0.875rem;  /* 14px */
  --lgk-size-base: 1rem;      /* 16px */
  --lgk-size-md:   1.125rem;  /* 18px */
  --lgk-size-lg:   1.25rem;   /* 20px */
  --lgk-size-xl:   1.5rem;    /* 24px */
  --lgk-size-2xl:  2rem;      /* 32px */
  --lgk-size-3xl:  2.5rem;    /* 40px */
  --lgk-size-4xl:  3rem;      /* 48px */

  --lgk-weight-regular: 400;
  --lgk-weight-semi:    600;
  --lgk-weight-bold:    700;
  --lgk-weight-extra:   800;
  --lgk-weight-black:   900;

  --lgk-leading-tight:  1.2;
  --lgk-leading-snug:   1.4;
  --lgk-leading-normal: 1.6;
  --lgk-leading-loose:  1.8;

  /* ─── Spacing ─────────────────────────────────────────────────────────── */
  --lgk-space-1:  0.25rem;   /* 4px  */
  --lgk-space-2:  0.5rem;    /* 8px  */
  --lgk-space-3:  0.75rem;   /* 12px */
  --lgk-space-4:  1rem;      /* 16px */
  --lgk-space-5:  1.25rem;   /* 20px */
  --lgk-space-6:  1.5rem;    /* 24px */
  --lgk-space-7:  2.5rem;    /* 40px */
  --lgk-space-8:  2rem;      /* 32px */
  --lgk-space-10: 2.5rem;    /* 40px */
  --lgk-space-12: 3rem;      /* 48px */
  --lgk-space-16: 4rem;      /* 64px */
  --lgk-space-20: 5rem;      /* 80px */
  --lgk-space-24: 6rem;      /* 96px */

  /* ─── Border radius ───────────────────────────────────────────────────── */
  --lgk-radius-sm:   8px;
  --lgk-radius-md:   16px;
  --lgk-radius-lg:   24px;
  --lgk-radius-xl:   32px;
  --lgk-radius-full: 9999px;

  /* ─── Shadows ─────────────────────────────────────────────────────────── */
  --lgk-shadow-sm: 0 2px 8px rgba(35, 60, 178, 0.08);
  --lgk-shadow-md: 0 4px 20px rgba(35, 60, 178, 0.12);
  --lgk-shadow-lg: 0 8px 40px rgba(35, 60, 178, 0.16);

  /* ─── Transitions ─────────────────────────────────────────────────────── */
  --lgk-transition: 0.25s ease;
}

/* ─── Base overrides (scoped to lgk blocks only) ────────────────────────── */
.lgk-block {
  font-family: var(--lgk-font);
  color: var(--lgk-text);
  line-height: var(--lgk-leading-normal);
  box-sizing: border-box;
}

.lgk-block *,
.lgk-block *::before,
.lgk-block *::after {
  box-sizing: inherit;
}

/* ─── Section heading pattern ───────────────────────────────────────────── */
.lgk-section-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  color: #233CB2;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.15;
  margin: 0 0 var(--lgk-space-8);
  /* Đảm bảo Flatsome không override */
  font-style: normal;
  text-decoration: none;
}

@media (max-width: 768px) {
  .lgk-section-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
    letter-spacing: 0.02em;
  }
}

/* ─── Index page section divider ────────────────────────────────────────── */
.lgk-index-divider {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--lgk-blue-100) 20%, var(--lgk-blue-100) 80%, transparent);
}

/* ─── UX Builder iframe — reset all full-bleed elements ─────────────────── */
.ux-builder-iframe .lgk-hero,
.ux-builder-iframe .lgk-blog__hero,
.ux-builder-iframe .lgk-blog-hero-block,
.ux-builder-iframe .lgk-vm2,
.ux-builder-iframe .lgk-ach-v2,
.ux-builder-iframe .lgk-contact__hero,
.ux-builder-iframe .lgk-single__hero,
.ux-builder-iframe .lgk-search__hero,
.ux-builder-iframe .lgk-index-divider {
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100% !important;
}
