/**
Theme Name: Astra Child
Author: Brainstorm Force
Author URI: http://wpastra.com/about/
Description: Astra is the fastest, fully customizable & beautiful theme suitable for blogs, personal portfolios and business websites. It is very lightweight (less than 50KB on frontend) and offers unparalleled speed. Built with SEO in mind, Astra comes with schema.org code integrated so search engines will love your site. Astra offers plenty of sidebar options and widget areas giving you a full control for customizations. Furthermore, we have included special features and templates so feel free to choose any of your favorite page builder plugin to create pages flexibly. Some of the other features: # WooCommerce Ready # Responsive # Compatible with major plugins # Translation Ready # Extendible with premium addons # Regularly updated # Designed, Developed, Maintained & Supported by Brainstorm Force. Looking for a perfect base theme? Look no further. Astra is fast, fully customizable and beautiful theme!
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: astra-child
Template: astra
*/
/* ═══ WPAI visual polish v1 (trial: maco24th) ═══════════════════
   ใช้ Elementor global colors (--e-global-color-*) เป็นฐาน
   → สีปรับตามแบรนด์ของแต่ละเว็บเองอัตโนมัติ */

/* 1) จังหวะพื้นหลังสลับ section — หน้าไม่แบนเป็นแผ่นเดียว */
[data-elementor-type="wp-page"] > .elementor-section:nth-of-type(even),
[data-elementor-type="wp-page"] > .e-con.e-parent:nth-of-type(even) {
  background: rgba(255, 255, 255, 0.025);
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

/* 2) หัวข้อไล่เฉดสีแบรนด์ — มีมิติแบบโลโก้ */
h1.elementor-heading-title,
h2.elementor-heading-title {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--e-global-color-primary) 45%, #ffffff) 0%,
    var(--e-global-color-primary) 62%,
    color-mix(in srgb, var(--e-global-color-primary) 72%, #000000) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--e-global-color-primary); /* fallback */
}

/* 3) ปุ่ม glossy + ยกตัวตอน hover */
.elementor-button {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--e-global-color-accent) 55%, #ffffff) 0%,
    var(--e-global-color-accent) 52%,
    color-mix(in srgb, var(--e-global-color-accent) 62%, #000000) 100%
  ) !important;
  box-shadow:
    0 6px 18px -6px color-mix(in srgb, var(--e-global-color-accent) 60%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.elementor-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow:
    0 12px 26px -8px color-mix(in srgb, var(--e-global-color-accent) 75%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

/* 4) รูปมีชีวิต — ชี้แล้วยกตัว + ขอบเรืองสีแบรนด์ (รวมกริดเกม/โปร) */
.elementor-widget-image img {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.elementor-widget-image:hover img {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 12px 28px -10px rgba(0, 0, 0, 0.65),
    0 0 0 1px color-mix(in srgb, var(--e-global-color-primary) 40%, transparent);
}

/* 5) FAQ accordion การ์ดมน มีช่องไฟ */
.elementor-accordion .elementor-accordion-item {
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.elementor-accordion .elementor-tab-title {
  padding: 14px 18px;
}

/* 6) scroll fade-in (คู่กับ JS ใน functions.php) */
@media (prefers-reduced-motion: no-preference) {
  .wpai-anim {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }
  .wpai-anim.wpai-in {
    opacity: 1;
    transform: none;
  }
}

/* ═══ WPAI polish v1.2: auto-contrast button text ══════════════
   ตัวหนังสือปุ่มเลือก ดำ/ขาว เองตามความสว่างของสีปุ่ม (accent)
   — ปุ่มโทนอ่อน (เช่น เบจ/ทอง) ได้ตัวดำ, ปุ่มเข้มได้ตัวขาว */
@supports (color: lch(from red calc(1% * infinity) 0 0)) {
  .elementor-button,
  .elementor-button:hover {
    color: lch(from var(--e-global-color-accent) calc((49.44 - l) * infinity) 0 0) !important;
  }
}

/* WPAI v1.2.1: ไอคอนในปุ่มใช้สีเดียวกับตัวหนังสือ (auto-contrast ด้วย) */
.elementor-button .elementor-button-icon,
.elementor-button .elementor-button-icon i,
.elementor-button .elementor-button-icon svg {
  color: inherit !important;
  fill: currentColor !important;
}
