/* รับทำเว็บโรงเรียน — ปัง ไล่สี เอฟเฟกต์ */
:root {
  --bg: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --primary: #1e40af;
  --primary-light: #3b82f6;
  --primary-dark: #1e3a8a;
  --cta: #ea580c;
  --cta-light: #f97316;
  --cta-dark: #c2410c;
  --purple: #7c3aed;
  --cyan: #06b6d4;
  --border: #e2e8f0;
  --footer-bg: #0f172a;
  --footer-text: #cbd5e1;
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Sarabun', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: linear-gradient(165deg, #f8fafc 0%, #f1f5f9 30%, #e0e7ff 70%, #fef3c7 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========== Header — gradient ขอบ + เงาสี ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--primary), var(--cta), var(--primary)) 1;
  box-shadow: 0 4px 20px rgba(30, 64, 175, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  gap: 1rem;
  position: relative;
}

.site-logo {
  font-weight: 700;
  font-size: 1.35rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  transition: var(--transition);
}

.site-logo:hover { filter: brightness(1.1); }

.nav-checkbox { display: none; }

.nav-toggle-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: var(--transition);
}

.nav-checkbox:checked ~ .nav-toggle-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-checkbox:checked ~ .nav-toggle-btn span:nth-child(2) { opacity: 0; }
.nav-checkbox:checked ~ .nav-toggle-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: var(--transition);
}

.site-nav a:hover {
  color: var(--primary);
  text-shadow: 0 0 20px rgba(30, 64, 175, 0.3);
}

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-header {
  background: linear-gradient(135deg, var(--cta) 0%, var(--cta-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.4);
}

.btn-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.5);
  color: #fff;
}

@media (max-width: 768px) {
  .nav-toggle-btn { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(12px);
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--primary), var(--cta)) 1;
    padding: 1rem 1.5rem;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease;
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.12);
  }
  .nav-checkbox:checked ~ .site-nav { max-height: 320px; opacity: 1; }
  .site-nav a { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
  .site-nav a:last-of-type { border-bottom: none; }
  .site-nav .btn-header { text-align: center; margin-top: 0.5rem; }
}

/* ========== Hero — gradient พื้นหลัง + หัวข้อไล่สี ========== */
.hero {
  position: relative;
  padding: 4rem 0 4.5rem;
  background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 25%, #fce7f3 50%, #fef3c7 75%, #d1fae5 100%);
  background-size: 200% 200%;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--primary), var(--cta), transparent) 1;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -20%;
  width: 50%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(234, 88, 12, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container { position: relative; z-index: 1; }

.hero-headline {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  max-width: 800px;
  padding-bottom: 0.75rem;
  background: linear-gradient(90deg, var(--primary) 0%, var(--purple) 50%, var(--cta) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border-bottom: 4px solid transparent;
  border-image: linear-gradient(90deg, var(--primary), var(--cta)) 1;
  display: inline-block;
}

.hero-subhead {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.hero-text {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 1.75rem;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn-primary {
  background: linear-gradient(135deg, var(--cta) 0%, var(--cta-dark) 100%);
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(234, 88, 12, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(234, 88, 12, 0.45);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, var(--primary), var(--purple)) 1;
  padding: 0.65rem 1.35rem;
  font-size: 1rem;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.08), rgba(124, 58, 237, 0.08));
  transform: translateY(-2px);
}

/* ========== Section — หัวข้อเส้นใต้ gradient ========== */
.section { padding: 4rem 0; }

.section-head {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  padding-bottom: 0.6rem;
  border-bottom: 4px solid transparent;
  border-image: linear-gradient(90deg, var(--primary), var(--cta)) 1;
  display: inline-block;
}

.section-lead {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 640px;
}

.section-services {
  background: linear-gradient(180deg, #f0f9ff 0%, #f8fafc 100%);
}
.section-transparency {
  background: linear-gradient(180deg, #faf5ff 0%, #ffffff 100%);
}
.section-plans {
  background: linear-gradient(180deg, #fff7ed 0%, #f8fafc 100%);
}
.section-trust {
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}
.section-results {
  background: linear-gradient(180deg, #ecfdf5 0%, #f0f9ff 100%);
}
.section-steps {
  background: linear-gradient(180deg, #f8fafc 0%, #faf5ff 100%);
}

/* ========== บริการ — การ์ด gradient ขอบ + เงาสี ========== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.service-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid transparent;
  border-image: linear-gradient(180deg, var(--primary), var(--cyan)) 1;
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  transition: var(--transition);
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  opacity: 0;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(30, 64, 175, 0.12), 0 0 0 1px rgba(30, 64, 175, 0.08);
  border-left-color: var(--cta);
}

.service-card:hover::before { opacity: 1; }

.service-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.service-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }

.service-tags li {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--primary);
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.1) 0%, rgba(124, 58, 237, 0.08) 100%);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

/* ========== ความโปร่งใส — gradient เส้นใต้ ========== */
.transparency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.transparency-item {
  padding: 1.5rem 0;
  border-bottom: 2px solid var(--border);
  transition: var(--transition);
}

.transparency-item:hover { border-bottom-color: var(--primary); }

.transparency-item:last-child { border-bottom: none; }

.transparency-item h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--primary), var(--cta)) 1;
  display: inline-block;
}

.transparency-item p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ========== แพ็กเกจ — การ์ด gradient + เงาสี ========== */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.plan-card {
  position: relative;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  transition: var(--transition);
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(30, 64, 175, 0.15), 0 0 0 2px rgba(30, 64, 175, 0.1);
  border-color: var(--primary-light);
}

.plan-featured {
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, var(--primary), var(--cta)) 1;
  box-shadow: 0 8px 24px rgba(30, 64, 175, 0.12), 0 0 0 1px rgba(234, 88, 12, 0.2);
}

.plan-featured:hover {
  box-shadow: 0 20px 50px rgba(30, 64, 175, 0.18), 0 8px 24px rgba(234, 88, 12, 0.15);
}

.plan-badge {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--cta) 0%, #dc2626 100%);
  border-radius: 0 var(--radius-lg) 0 8px;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.4);
}

.plan-name {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.plan-desc { font-size: 0.9375rem; color: var(--text-muted); margin-bottom: 1rem; }
.plan-price { margin-bottom: 1rem; }
.plan-old { display: block; font-size: 0.875rem; color: var(--text-muted); text-decoration: line-through; margin-bottom: 0.15rem; }
.plan-now {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--cta) 0%, var(--cta-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.plan-list { list-style: none; margin-bottom: 1.5rem; }

.plan-list li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.45rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text);
}

.plan-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.875rem;
}

.btn-plan {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--cta) 0%, var(--cta-dark) 100%);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}

.btn-plan:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.45);
  color: #fff;
}

/* ========== ความมั่นใจ ========== */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.trust-item h3 {
  font-size: 1.125rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.trust-item p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ========== ผลลัพธ์ — การ์ด gradient พื้น + ตัวเลขไล่สี ========== */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.result-card {
  position: relative;
  background: linear-gradient(145deg, #ffffff 0%, #f0f9ff 50%, #fef3c7 100%);
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, var(--primary), var(--cta)) 1;
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 8px 24px rgba(30, 64, 175, 0.1);
  transition: var(--transition);
  overflow: hidden;
}

.result-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--cta), var(--purple));
}

.result-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 40px rgba(30, 64, 175, 0.2), 0 0 0 1px rgba(30, 64, 175, 0.1);
}

.result-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.result-unit {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--cta) 0%, var(--cta-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}

.result-label {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}

/* ========== ขั้นตอน — วงกลม gradient ========== */
.steps-list {
  list-style: none;
  counter-reset: step;
  max-width: 720px;
  margin: 0 auto;
}

.steps-list li {
  position: relative;
  padding-left: 3.5rem;
  margin-bottom: 2rem;
  counter-increment: step;
}

.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.25rem;
  height: 2.25rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4);
}

.steps-list li:last-child { margin-bottom: 0; }

.steps-list h3 { font-size: 1.0625rem; font-weight: 700; color: var(--text); margin-bottom: 0.35rem; }
.steps-list p { font-size: 0.9375rem; line-height: 1.65; color: var(--text-muted); }

/* ========== CTA Strip — gradient พื้นหลังปัง ========== */
.section-cta {
  position: relative;
  background: linear-gradient(135deg, var(--cta) 0%, #dc2626 50%, #b91c1c 100%);
  color: #fff;
  text-align: center;
  padding: 3.5rem 0;
  overflow: hidden;
}

.section-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.section-cta .container { position: relative; z-index: 1; }

.cta-head {
  font-size: clamp(1.35rem, 3vw, 1.625rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.cta-text {
  font-size: 1.0625rem;
  opacity: 0.95;
  margin-bottom: 1.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.section-cta .btn-primary {
  background: linear-gradient(135deg, #fff 0%, #fef3c7 100%);
  color: var(--cta-dark);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.section-cta .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  color: var(--cta-dark);
}

.btn-lg { padding: 0.85rem 2rem; font-size: 1.0625rem; }

/* ========== ติดต่อ — กล่อง gradient ขอบ ========== */
.section-contact {
  background: linear-gradient(180deg, #fef3c7 0%, #f8fafc 100%);
}

.contact-block {
  max-width: 400px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem;
  background: var(--bg);
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, var(--primary), var(--cta)) 1;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(30, 64, 175, 0.1);
}

.contact-block p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.contact-block p:last-child { margin-bottom: 0; }
.contact-block strong {
  background: linear-gradient(135deg, var(--primary), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-right: 0.35rem;
}

/* ========== Footer — gradient พื้นหลัง ========== */
.site-footer {
  margin-top: auto;
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  color: var(--footer-text);
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding: 2.5rem 1.5rem;
}

.footer-col h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--primary-light), var(--cta)) 1;
  display: inline-block;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.4rem; }

.footer-col a {
  color: rgba(203, 213, 225, 0.9);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: var(--transition);
}

.footer-col a:hover { color: #fff; text-shadow: 0 0 12px rgba(255,255,255,0.3); }

.footer-col p {
  font-size: 0.9375rem;
  color: rgba(203, 213, 225, 0.85);
  margin-bottom: 0.35rem;
  line-height: 1.55;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1rem 1.5rem;
}

.footer-bottom p {
  font-size: 0.875rem;
  color: rgba(203, 213, 225, 0.6);
  text-align: center;
  margin: 0;
}

/* ========== หน้าโรงเรียน (แยก Phat) ========== */
.school-page {
  padding: 2rem 0 4rem;
  min-height: 60vh;
}

.school-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}

.school-tabs-link {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.school-tabs-link:hover {
  color: var(--primary);
  background: rgba(30, 64, 175, 0.06);
}

.school-tabs-link.active {
  color: var(--primary);
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.12), rgba(124, 58, 237, 0.08));
  border: 1px solid rgba(30, 64, 175, 0.2);
}

.school-logo-wrap {
  text-align: center;
  margin-bottom: 2rem;
}

.school-logo {
  max-width: 200px;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.school-content {
  max-width: 720px;
  margin: 0 auto;
}

.school-content h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--primary), var(--cta)) 1;
  display: inline-block;
}

.school-content .lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.school-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.school-content p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 1rem;
}

.school-nav {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.school-nav a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.school-nav a:hover { color: var(--cta); }

/* ========== ประวัติโรงเรียนทั้งหมด (รายการ + เลื่อนหน้า) ========== */
.schools-list-page {
  padding: 2rem 0 4rem;
  min-height: 60vh;
}

.schools-list-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--primary), var(--cta)) 1;
  display: inline-block;
}

.schools-list-lead {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.schools-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.school-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.school-card:hover {
  box-shadow: 0 8px 24px rgba(30, 64, 175, 0.12);
  transform: translateY(-4px);
  border-color: rgba(30, 64, 175, 0.2);
}

.school-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.school-card-image-wrap {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.school-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.school-card:hover .school-card-image {
  transform: scale(1.05);
}

.school-card-body {
  padding: 1rem 1.25rem;
}

.school-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.school-card-name-en {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.school-card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.schools-pagination {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.pagination-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.pagination-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.pagination-link:hover {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.08), rgba(124, 58, 237, 0.06));
  border-color: var(--primary);
}

.pagination-current {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff;
  font-weight: 600;
}

.pagination-info {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* รูปในหน้าประวัติโรงเรียน (โลโก้/รูปโรงเรียน) */
.school-hero-image {
  margin-bottom: 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.school-hero-image img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* ========== มือถือ ========== */
@media (max-width: 768px) {
  .container { padding: 0 1rem; }
  .hero { padding: 3rem 0 3.5rem; }
  .hero-headline { padding-bottom: 0.5rem; border-bottom-width: 3px; }
  .section { padding: 3rem 0; }
  .section-head { padding-bottom: 0.5rem; border-bottom-width: 3px; }
  .service-grid, .plans-grid { grid-template-columns: 1fr; }
  .transparency-grid, .trust-grid { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .result-card:hover { transform: translateY(-4px); }
  .footer-inner { padding: 2rem 1rem; grid-template-columns: 1fr; }
}
