/*
Theme Name:   TripleMind Child
Theme URI:    https://triplemind.co.th
Description:  Child Theme สำหรับ Plant Theme โดย หจก.ทริปเปิ้ลไมนด์
Author:       หจก.ทริปเปิ้ลไมนด์
Author URI:   https://triplemind.co.th
Template:     plant3
Version:      1.0.0
Text Domain:  triplemind-child
*/

/* =============================================================
   TABLE OF CONTENTS
   1. CSS Variables (Brand Colors)
   2. Global Reset & Base
   3. Typography
   4. Header & Navigation
   5. Hero / Smart Slider Override
   6. Section: Services
   7. Section: Portfolio
   8. Section: About
   9. Section: Contact
   10. Footer
   11. Buttons & CTA
   12. Utilities
   13. Responsive
   ============================================================= */


/* -------------------------------------------------------------
   1. CSS VARIABLES — แก้สีที่นี่ที่เดียวพอ
   ------------------------------------------------------------- */
:root {
  /* =====================================================
     BRAND COLORS — จากโลโก้ หจก.ทริปเปิ้ลไมนด์
     โทนหลัก: แดงกุหลาบ/คอรัล (#F0445A)
     สไตล์: Minimal · Clean · มีลูกเล่น
     ===================================================== */

  --tm-primary:       #F0445A;   /* แดงกุหลาบ — สีโลโก้หลัก */
  --tm-primary-dark:  #C9324A;   /* แดงเข้ม — hover state */
  --tm-primary-light: #F9707F;   /* แดงอ่อน — gradient / tint */
  --tm-secondary:     #FF8FA3;   /* ชมพูพาสเทล — accent รอง */
  --tm-accent:        #FF3D5A;   /* แดงสด — CTA เด่น / badge */

  /* Neutral (minimal base) */
  --tm-dark:          #1C1C1E;   /* เกือบดำ — footer / dark section */
  --tm-gray-900:      #2C2C2E;   /* ตัวอักษรหลัก */
  --tm-gray-600:      #636366;   /* ตัวอักษรรอง */
  --tm-gray-300:      #D1D1D6;   /* border */
  --tm-gray-100:      #F2F2F7;   /* พื้นหลัง section อ่อน */
  --tm-white:         #FFFFFF;

  /* Alias สำหรับ compatibility */
  --tm-light:         #F2F2F7;
  --tm-text:          #2C2C2E;
  --tm-text-muted:    #636366;
  --tm-border:        #E5E5EA;

  /* =====================================================
     MINIMAL STYLE TOKENS — ลูกเล่นที่ clean
     ===================================================== */

  /* Gradients */
  --tm-gradient-brand:   linear-gradient(135deg, #F0445A 0%, #FF8FA3 100%);
  --tm-gradient-warm:    linear-gradient(135deg, #F0445A 0%, #FF6B35 100%);
  --tm-gradient-soft:    linear-gradient(135deg, #FFF0F2 0%, #FFE4E8 100%);
  --tm-gradient-dark:    linear-gradient(135deg, #1C1C1E 0%, #3A3A3C 100%);

  /* Typography */
  --tm-font-th:       'Sarabun', 'Prompt', sans-serif;
  --tm-font-en:       'Inter', 'Segoe UI', sans-serif;
  --tm-font-code:     'JetBrains Mono', 'Courier New', monospace;

  /* Font weights */
  --tm-fw-regular:    400;
  --tm-fw-medium:     500;
  --tm-fw-semibold:   600;
  --tm-fw-bold:       700;
  --tm-fw-black:      800;

  /* Spacing */
  --tm-section-py:    88px;
  --tm-container:     1180px;

  /* Shadows — minimal, soft */
  --tm-shadow-xs:     0 1px 3px rgba(240, 68, 90, 0.08);
  --tm-shadow-sm:     0 2px 12px rgba(0, 0, 0, 0.06);
  --tm-shadow-md:     0 4px 24px rgba(0, 0, 0, 0.09);
  --tm-shadow-lg:     0 12px 48px rgba(0, 0, 0, 0.13);
  --tm-shadow-brand:  0 6px 24px rgba(240, 68, 90, 0.28);  /* เงาสีแบรนด์ */

  /* Border Radius — minimal รูปทรงสะอาด */
  --tm-radius-sm:     6px;
  --tm-radius:        10px;
  --tm-radius-lg:     16px;
  --tm-radius-xl:     24px;
  --tm-radius-pill:   999px;

  /* Transitions */
  --tm-transition:    all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --tm-transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}


/* -------------------------------------------------------------
   2. GLOBAL RESET & BASE
   ------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--tm-font-th);
  color: var(--tm-text);
  background-color: var(--tm-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--tm-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--tm-primary);
}


/* -------------------------------------------------------------
   3. TYPOGRAPHY
   ------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--tm-font-th);
  font-weight: var(--tm-fw-bold);
  line-height: 1.3;
  color: var(--tm-gray-900);
  margin-bottom: 0.75em;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
h4 { font-size: 1.2rem; }

p {
  margin-bottom: 1rem;
  color: var(--tm-text);
}

.tm-section-title {
  text-align: center;
  margin-bottom: 12px;
  color: var(--tm-gray-900);
}

.tm-section-subtitle {
  text-align: center;
  color: var(--tm-text-muted);
  font-size: 1.05rem;
  margin-bottom: 52px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.75;
}

/* เส้นใต้หัวข้อ — สีแบรนด์ */
.tm-section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--tm-gradient-brand);
  margin: 14px auto 0;
  border-radius: var(--tm-radius-pill);
}

/* Label เล็กๆ เหนือหัวข้อ section */
.tm-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: var(--tm-fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--tm-primary);
  background: rgba(240, 68, 90, 0.08);
  padding: 4px 12px;
  border-radius: var(--tm-radius-pill);
  margin-bottom: 12px;
}


/* -------------------------------------------------------------
   4. HEADER & NAVIGATION
   ------------------------------------------------------------- */
.site-header,
#masthead {
  background: rgba(255,255,255,0.92) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--tm-transition);
}

/* เส้นแดงบางๆ ด้านบน header — signature ของแบรนด์ */
.site-header::before,
#masthead::before {
  content: '';
  display: block;
  height: 3px;
  background: var(--tm-gradient-brand);
  position: absolute;
  top: 0; left: 0; right: 0;
}

.site-header.scrolled {
  border-bottom-color: var(--tm-border);
  box-shadow: var(--tm-shadow-sm);
}

/* Logo */
.site-logo img,
.custom-logo {
  max-height: 48px;
  width: auto;
}

/* Nav links */
.main-navigation a,
.nav-menu a {
  font-family: var(--tm-font-th);
  font-weight: var(--tm-fw-semibold);
  font-size: 0.92rem;
  color: var(--tm-gray-900) !important;
  padding: 7px 14px;
  border-radius: var(--tm-radius-pill);
  transition: var(--tm-transition);
  letter-spacing: 0.01em;
}

.main-navigation a:hover,
.nav-menu a:hover {
  color: var(--tm-primary) !important;
  background: rgba(240, 68, 90, 0.07);
}

.main-navigation .current-menu-item > a {
  color: var(--tm-primary) !important;
  background: rgba(240, 68, 90, 0.1);
}

/* Nav CTA button */
.nav-cta a,
.menu-item-cta a {
  background: var(--tm-gradient-brand) !important;
  color: var(--tm-white) !important;
  padding: 8px 22px !important;
  border-radius: var(--tm-radius-pill) !important;
  box-shadow: var(--tm-shadow-brand) !important;
}

.nav-cta a:hover,
.menu-item-cta a:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(240, 68, 90, 0.36) !important;
  color: var(--tm-white) !important;
}


/* -------------------------------------------------------------
   5. HERO / SMART SLIDER OVERRIDE
   ------------------------------------------------------------- */
.smartslider-section,
#n2-ss-2,
.n2-ss-slider-wrapper {
  margin-top: 0 !important;
}

/* Hero overlay text ให้อ่านง่ายบน slider */
.tm-hero-caption {
  background: rgba(26, 60, 110, 0.7);
  padding: 32px 40px;
  border-radius: var(--tm-radius-lg);
  backdrop-filter: blur(4px);
}

.tm-hero-caption h1 {
  color: var(--tm-white);
  font-size: clamp(1.8rem, 4vw, 3rem);
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.tm-hero-caption p {
  color: rgba(255,255,255,0.9);
  font-size: 1.1rem;
}


/* -------------------------------------------------------------
   6. SECTION: SERVICES
   ------------------------------------------------------------- */
.tm-services {
  padding: var(--tm-section-py) 0;
  background: var(--tm-gray-100);
  position: relative;
  overflow: hidden;
}

/* ลูกเล่น: วงกลมใหญ่โปร่งใสด้านหลัง */
.tm-services::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,68,90,0.05) 0%, transparent 70%);
  top: -200px; right: -200px;
  pointer-events: none;
}

.tm-service-card {
  background: var(--tm-white);
  border-radius: var(--tm-radius-lg);
  padding: 36px 28px;
  text-align: left;
  box-shadow: var(--tm-shadow-sm);
  border: 1px solid var(--tm-border);
  transition: var(--tm-transition-slow);
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* เส้นบางๆ ด้านบนการ์ด — แสดงเมื่อ hover */
.tm-service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--tm-gradient-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.tm-service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--tm-shadow-lg);
  border-color: rgba(240, 68, 90, 0.15);
}

.tm-service-card:hover::before {
  transform: scaleX(1);
}

.tm-service-icon {
  width: 56px;
  height: 56px;
  background: rgba(240, 68, 90, 0.08);
  border-radius: var(--tm-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.6rem;
  transition: var(--tm-transition);
}

.tm-service-card:hover .tm-service-icon {
  background: var(--tm-gradient-brand);
}

.tm-service-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--tm-gray-900);
}

.tm-service-card p {
  font-size: 0.92rem;
  color: var(--tm-text-muted);
  line-height: 1.7;
  margin: 0;
}


/* -------------------------------------------------------------
   7. SECTION: PORTFOLIO
   ------------------------------------------------------------- */
.tm-portfolio {
  padding: var(--tm-section-py) 0;
  background: var(--tm-white);
}

.tm-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.tm-portfolio-card {
  border-radius: var(--tm-radius-lg);
  overflow: hidden;
  box-shadow: var(--tm-shadow-sm);
  border: 1px solid var(--tm-border);
  transition: var(--tm-transition-slow);
  background: var(--tm-white);
}

.tm-portfolio-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--tm-shadow-lg);
  border-color: rgba(240, 68, 90, 0.2);
}

.tm-portfolio-card-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--tm-gray-100);
}

.tm-portfolio-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tm-portfolio-card:hover .tm-portfolio-card-thumb img {
  transform: scale(1.06);
}

.tm-portfolio-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(28, 28, 30, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
}

.tm-portfolio-card:hover .tm-portfolio-card-overlay {
  opacity: 1;
}

.tm-portfolio-card-body {
  padding: 20px 22px 22px;
}

.tm-portfolio-card-body h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--tm-gray-900);
}

.tm-portfolio-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: var(--tm-fw-semibold);
  padding: 3px 9px;
  border-radius: var(--tm-radius-pill);
  background: rgba(240, 68, 90, 0.07);
  color: var(--tm-primary);
  margin-right: 4px;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

/* Demo badge */
.tm-demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--tm-gradient-brand);
  color: var(--tm-white);
  font-size: 0.78rem;
  font-weight: var(--tm-fw-bold);
  padding: 5px 13px;
  border-radius: var(--tm-radius-pill);
  margin-top: 12px;
  box-shadow: 0 3px 12px rgba(240, 68, 90, 0.3);
  transition: var(--tm-transition);
  letter-spacing: 0.02em;
}

.tm-demo-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--tm-shadow-brand);
  color: var(--tm-white);
}

.tm-demo-badge::before {
  content: '▶';
  font-size: 0.65rem;
}


/* -------------------------------------------------------------
   8. SECTION: ABOUT
   ------------------------------------------------------------- */
.tm-about {
  padding: var(--tm-section-py) 0;
  background: var(--tm-gray-100);
}

.tm-about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.tm-stat-box {
  text-align: center;
  padding: 28px 16px;
  background: var(--tm-white);
  border-radius: var(--tm-radius-lg);
  box-shadow: var(--tm-shadow-sm);
  border: 1px solid var(--tm-border);
  transition: var(--tm-transition);
}

.tm-stat-box:hover {
  border-color: rgba(240, 68, 90, 0.2);
  box-shadow: var(--tm-shadow-md);
  transform: translateY(-3px);
}

.tm-stat-number {
  font-size: 2.4rem;
  font-weight: var(--tm-fw-black);
  background: var(--tm-gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  display: block;
}

.tm-stat-label {
  font-size: 0.82rem;
  color: var(--tm-text-muted);
  margin-top: 8px;
  display: block;
  font-weight: var(--tm-fw-medium);
}

/* Highlight จุดเด่น */
.tm-highlight-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.tm-highlight-list li {
  padding: 10px 0 10px 30px;
  position: relative;
  border-bottom: 1px solid var(--tm-border);
  font-size: 0.94rem;
  color: var(--tm-text);
}

.tm-highlight-list li:last-child {
  border-bottom: none;
}

.tm-highlight-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--tm-primary);
  font-weight: var(--tm-fw-bold);
  font-size: 0.95rem;
}


/* -------------------------------------------------------------
   9. SECTION: CONTACT
   ------------------------------------------------------------- */
.tm-contact {
  padding: var(--tm-section-py) 0;
  background: var(--tm-white);
}

.tm-contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.tm-contact-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  background: rgba(240, 68, 90, 0.08);
  border-radius: var(--tm-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--tm-primary);
  transition: var(--tm-transition);
}

.tm-contact-info-item:hover .tm-contact-icon {
  background: var(--tm-primary);
  color: var(--tm-white);
}

/* Google Map embed */
.tm-map-wrapper {
  border-radius: var(--tm-radius-lg);
  overflow: hidden;
  box-shadow: var(--tm-shadow-md);
  border: 1px solid var(--tm-border);
}

.tm-map-wrapper iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: none;
}


/* -------------------------------------------------------------
   10. FOOTER
   ------------------------------------------------------------- */
.site-footer,
#colophon {
  background: var(--tm-dark) !important;
  color: rgba(255,255,255,0.65);
  padding: 64px 0 0;
  position: relative;
}

/* เส้นแดงบางๆ ด้านบน footer */
.site-footer::before,
#colophon::before {
  content: '';
  display: block;
  height: 3px;
  background: var(--tm-gradient-brand);
  position: absolute;
  top: 0; left: 0; right: 0;
}

.tm-footer-logo {
  max-height: 44px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  margin-bottom: 14px;
}

.tm-footer-tagline {
  color: rgba(255,255,255,0.42);
  font-size: 0.88rem;
  line-height: 1.65;
}

.tm-footer-heading {
  color: var(--tm-white);
  font-size: 0.82rem;
  font-weight: var(--tm-fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.tm-footer-links {
  list-style: none;
  padding: 0;
}

.tm-footer-links li {
  margin-bottom: 9px;
}

.tm-footer-links a {
  color: rgba(255,255,255,0.48);
  font-size: 0.9rem;
  transition: var(--tm-transition);
}

.tm-footer-links a:hover {
  color: var(--tm-secondary);  /* ชมพูอ่อนเมื่อ hover */
}

.tm-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
  margin-top: 52px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.28);
}

/* Line button ใน footer */
.tm-line-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #06c755;
  color: var(--tm-white);
  padding: 9px 20px;
  border-radius: var(--tm-radius-pill);
  font-size: 0.88rem;
  font-weight: var(--tm-fw-semibold);
  margin-top: 14px;
  transition: var(--tm-transition);
  box-shadow: 0 3px 12px rgba(6, 199, 85, 0.3);
}

.tm-line-btn:hover {
  background: #05b34c;
  color: var(--tm-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 199, 85, 0.4);
}


/* -------------------------------------------------------------
   11. BUTTONS & CTA
   ------------------------------------------------------------- */
.tm-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: var(--tm-radius-pill);
  font-family: var(--tm-font-th);
  font-weight: var(--tm-fw-semibold);
  font-size: 0.93rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--tm-transition);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.tm-btn-primary {
  background: var(--tm-gradient-brand);
  color: var(--tm-white);
  box-shadow: var(--tm-shadow-brand);
}

.tm-btn-primary:hover {
  opacity: 0.88;
  color: var(--tm-white);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(240, 68, 90, 0.38);
}

.tm-btn-accent {
  background: var(--tm-white);
  color: var(--tm-primary);
  border-color: var(--tm-primary);
}

.tm-btn-accent:hover {
  background: var(--tm-primary);
  color: var(--tm-white);
  transform: translateY(-2px);
  box-shadow: var(--tm-shadow-brand);
}

.tm-btn-outline {
  background: transparent;
  color: var(--tm-white);
  border-color: rgba(255,255,255,0.6);
}

.tm-btn-outline:hover {
  background: var(--tm-white);
  color: var(--tm-primary);
  border-color: var(--tm-white);
  transform: translateY(-2px);
}

.tm-btn-ghost {
  background: rgba(240, 68, 90, 0.07);
  color: var(--tm-primary);
  border-color: transparent;
}

.tm-btn-ghost:hover {
  background: rgba(240, 68, 90, 0.14);
  color: var(--tm-primary-dark);
}

/* CTA Banner */
.tm-cta-banner {
  background: var(--tm-gradient-brand);
  padding: 72px 0;
  text-align: center;
  color: var(--tm-white);
  position: relative;
  overflow: hidden;
}

/* ลูกเล่น: วงกลมโปร่งใสใน CTA */
.tm-cta-banner::before,
.tm-cta-banner::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  pointer-events: none;
}

.tm-cta-banner::before {
  width: 400px; height: 400px;
  top: -200px; left: -100px;
}

.tm-cta-banner::after {
  width: 300px; height: 300px;
  bottom: -150px; right: -50px;
}

.tm-cta-banner h2 {
  color: var(--tm-white);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  position: relative;
}

.tm-cta-banner p {
  color: rgba(255,255,255,0.88);
  font-size: 1.05rem;
  margin-bottom: 36px;
  position: relative;
}


/* -------------------------------------------------------------
   12. UTILITIES
   ------------------------------------------------------------- */
.tm-container {
  max-width: var(--tm-container);
  margin: 0 auto;
  padding: 0 24px;
}

.tm-text-center  { text-align: center; }
.tm-text-primary { color: var(--tm-primary); }
.tm-text-muted   { color: var(--tm-text-muted); }
.tm-bg-light     { background-color: var(--tm-gray-100); }
.tm-bg-dark      { background-color: var(--tm-dark); }

/* Grid helpers */
.tm-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.tm-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tm-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* Section spacing */
.tm-section { padding: var(--tm-section-py) 0; }

/* Divider */
.tm-divider {
  width: 48px;
  height: 3px;
  background: var(--tm-gradient-brand);
  border-radius: var(--tm-radius-pill);
  margin: 12px 0 24px;
}
.tm-divider-center { margin: 12px auto 24px; }

/* Tag / Badge */
.tm-badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: var(--tm-radius-pill);
  font-size: 0.72rem;
  font-weight: var(--tm-fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tm-badge-brand { background: rgba(240,68,90,0.1);  color: var(--tm-primary); }
.tm-badge-green { background: rgba(52,199,89,0.1);  color: #1a8a3a; }
.tm-badge-gray  { background: var(--tm-gray-100);   color: var(--tm-gray-600); }

/* Fade-in animation (trigger via JS IntersectionObserver) */
.tm-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.tm-fade-in.tm-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay สำหรับ card ในกลุ่ม */
.tm-fade-in:nth-child(2) { transition-delay: 0.08s; }
.tm-fade-in:nth-child(3) { transition-delay: 0.16s; }
.tm-fade-in:nth-child(4) { transition-delay: 0.24s; }

/* Glass card (optional ใช้ได้บน hero section) */
.tm-glass {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--tm-radius-lg);
}


/* -------------------------------------------------------------
   13. RESPONSIVE
   ------------------------------------------------------------- */

/* Tablet */
@media (max-width: 1024px) {
  :root { --tm-section-py: 64px; }
  .tm-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 768px) {
  :root { --tm-section-py: 48px; }

  .tm-grid-2,
  .tm-grid-3,
  .tm-grid-4 { grid-template-columns: 1fr; }

  .tm-about-stats { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .tm-stat-number { font-size: 1.8rem; }

  .tm-portfolio-grid { grid-template-columns: 1fr; }

  .tm-map-wrapper iframe { height: 260px; }

  .tm-cta-banner { padding: 48px 0; }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
}

/* Small mobile */
@media (max-width: 480px) {
  .tm-about-stats { grid-template-columns: 1fr; }
  .tm-btn { width: 100%; justify-content: center; }
}
