/* =====================================================================
   sections.css — ส่วนเนื้อหาใต้ hero: บริการ / ทำไมต้อง 9ART / footer / ปุ่มลอย
   ===================================================================== */

.section {
  position: relative;
  z-index: 1;
  padding: clamp(3rem, 7vw, 6rem) 0;
  font-family: 'Sarabun', sans-serif;
  color: #fff;
}
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.1rem, 3vw, 2.4rem);
}

/* เส้นทองสั้น ๆ คั่น (~200px) */
.gold-line {
  display: block;
  width: 200px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(214,176,90,0) 0%, #f0c977 20%, #e8b74d 50%, #f6d488 80%, rgba(214,176,90,0) 100%);
}

.section__head { text-align: center; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__head .gold-line { margin: 0 auto 1.1rem; }
.section__title {
  font-family: 'Kanit', sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin: 0 0 0.4rem;
}
.section__sub {
  font-size: clamp(0.95rem, 1.4vw, 1.08rem);
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

/* ---------------------------------------------------------------------
   SECTION 2 — บริการ (พื้นตารางจาง ๆ)
   --------------------------------------------------------------------- */
.section--grid {
  background-color: #171a3d;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.6rem);
}
.card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 1.7rem 1.5rem;
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 20px 40px rgba(8, 8, 40, 0.4);
}
.card__icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #6d3fd6, #4750cf);
  margin-bottom: 1.1rem;
}
.card__icon svg {
  width: 26px; height: 26px;
  fill: none; stroke: #fff;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.card__title {
  font-family: 'Kanit', sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}
.card__desc {
  font-size: 0.96rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

/* ---------------------------------------------------------------------
   SECTION 4 — 9ART DevTeam Skills (ไอคอนสแต็ก)
   --------------------------------------------------------------------- */
.section--skills {
  background:
    radial-gradient(circle at 50% 0%, rgba(109, 63, 214, 0.18) 0%, rgba(109, 63, 214, 0) 55%),
    #12142f;
}
.skills {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));   /* เดสก์ท็อป: 8 คอลัมน์ แถวเดียว */
  gap: 5px;                                            /* ห่างกัน 5px ตามที่ขอ */
}
.skill {
  min-width: 0;               /* สำคัญ: กันไอคอน/ชื่อดันให้คอลัมน์บวมจนล้น */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1.05rem 0.5rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.skill:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 16px 34px rgba(8, 8, 40, 0.42);
}
.skill__icon {
  flex: none;                 /* ล็อกขนาด ไม่ยืดตามคอลัมน์ */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
}
.skill__icon svg {
  display: block;
  width: 40px; height: 40px;  /* ไอคอนคงที่ 40px เสมอ ไม่บวมเต็มจอ */
  max-width: 100%;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}
.skill__name {
  max-width: 100%;
  font-family: 'Sarabun', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* แท็บเล็ต (แนวตั้ง/แนวนอน): 4 ต่อแถว */
@media (max-width: 991.98px) {
  .skills { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* มือถือ: 2 ต่อแถว */
@media (max-width: 575.98px) {
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill { padding: 0.9rem 0.5rem; }
}

/* ---------------------------------------------------------------------
   SECTION 3 — ทำไมต้อง 9ART (gradient ตื่นตา)
   --------------------------------------------------------------------- */
.section--why {
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 91, 91, 0.28) 0%, rgba(255, 91, 91, 0) 40%),
    radial-gradient(circle at 90% 85%, rgba(0, 220, 130, 0.22) 0%, rgba(0, 220, 130, 0) 45%),
    linear-gradient(125deg, #2a1466 0%, #4327b0 40%, #6d3fd6 70%, #2563eb 100%);
  overflow: hidden;
}
.why {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.why__text .gold-line { margin: 0 0 1.1rem; }
.why__text .section__title { text-align: left; }
.why__text .section__sub { margin-bottom: 1.4rem; }
.why__list { list-style: none; margin: 0 0 1.8rem; padding: 0; }
.why__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 0.85rem;
}
.chk {
  flex: none;
  width: 22px; height: 22px;
  margin-top: 2px;
  fill: none; stroke: #6dffb0;
  stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  background: rgba(0, 220, 130, 0.15);
  border-radius: 50%;
  padding: 3px;
}
.why__cta { margin-top: 0.3rem; }

.why__media { position: relative; text-align: center; }
.why__media img {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
  filter: drop-shadow(0 26px 50px rgba(8, 8, 40, 0.5));
}

/* ---------------------------------------------------------------------
   FOOTER
   --------------------------------------------------------------------- */
.footer {
  position: relative;
  z-index: 1;
  background: #0d0f28;
  color: rgba(255, 255, 255, 0.82);
  font-family: 'Sarabun', sans-serif;
  padding-top: clamp(2.5rem, 5vw, 4rem);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-bottom: 2.5rem;
}
.footer__brand .navbar__logo { font-size: 1.6rem; }
.footer__brand p {
  margin: 0.9rem 0 1.1rem;
  max-width: 42ch;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.62);
}
.footer__socials { display: flex; gap: 0.5rem; }

.footer__contact h3 {
  font-family: 'Kanit', sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: #fff;
  margin: 0 0 1rem;
}
.footer__contact ul { list-style: none; margin: 0; padding: 0; }
.footer__contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
  line-height: 1.55;
}
.footer__contact a { color: rgba(255, 255, 255, 0.82); text-decoration: none; }
.footer__contact a:hover { color: #fff; }
.fi {
  flex: none;
  width: 20px; height: 20px;
  margin-top: 2px;
  fill: none; stroke: #a78bfa;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.footer__bar {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.1rem 0;
  text-align: center;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------------------------------------------------------------------
   ปุ่มลอยมุมกลางขวา + tooltip
   --------------------------------------------------------------------- */
.fab {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.fab__btn {
  position: relative;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #6d3fd6, #4750cf);
  /* แสงขาว + ออร่ารอบปุ่ม (เต้นเบา ๆ) */
  box-shadow:
    0 10px 26px rgba(8, 8, 40, 0.45),
    0 0 16px 3px rgba(255, 255, 255, 0.38);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  animation: fabAura 2.6s ease-in-out infinite;
}
/* คละสีปุ่มลอยแต่ละปุ่ม */
.fab__btn--quote  { background: linear-gradient(135deg, #8b5cf6, #6d3fd6); }
.fab__btn--form   { background: linear-gradient(135deg, #0ea5e9, #2563eb); }
.fab__btn--campus { background: linear-gradient(135deg, #10b981, #059669); }
.fab__btn--top    { background: linear-gradient(135deg, #f59e0b, #ef4444); }
@keyframes fabAura {
  0%, 100% {
    box-shadow:
      0 10px 26px rgba(8, 8, 40, 0.45),
      0 0 14px 2px rgba(255, 255, 255, 0.32);
  }
  50% {
    box-shadow:
      0 10px 26px rgba(8, 8, 40, 0.45),
      0 0 28px 7px rgba(255, 255, 255, 0.68);
  }
}
.fab__btn svg {
  width: 24px; height: 24px;
  fill: none; stroke: #fff;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
}
.fab__btn:hover {
  transform: translateY(-3px) scale(1.08);
  filter: brightness(1.1);
  box-shadow:
    0 16px 34px rgba(8, 8, 40, 0.55),
    0 0 34px 10px rgba(255, 255, 255, 0.85);
}
/* tooltip โผล่ทางซ้ายของปุ่ม */
.fab__btn::after {
  content: attr(data-tip);
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: #16182c;
  color: #fff;
  font-family: 'Sarabun', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.fab__btn::before {   /* หางลูกศร tooltip */
  content: "";
  position: absolute;
  right: calc(100% + 6px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  border: 6px solid transparent;
  border-left-color: #16182c;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.fab__btn:hover::after,
.fab__btn:hover::before {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* =====================================================================
   RESPONSIVE (sections)
   ===================================================================== */
@media (max-width: 991.98px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .why { grid-template-columns: 1fr; }
  .why__media { order: -1; max-width: 460px; margin: 0 auto; }
}
@media (max-width: 575.98px) {
  .cards { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .fab { right: 16px; bottom: 16px; gap: 0.6rem; }
  .fab__btn { width: 46px; height: 46px; }
  /* บนมือถือแสดง tooltip ตลอด (ไม่มี hover) เป็น label ใต้ปุ่มไม่จำเป็น -> ซ่อน */
  .fab__btn::after, .fab__btn::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fab__btn { animation: none; }
}

/* ===== SITE FOOTER (ใช้ร่วมทุกหน้า — includes/footer.php) ===== */
.site-footer{
  position: relative;
  z-index: 1;
  background: #0d0f28;
  border-top: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.72);
  font-family: 'Sarabun', sans-serif;
  padding: clamp(2.5rem,5vw,4rem) clamp(1.1rem,3vw,2rem) 0;
}
.footer-top{
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1.3fr;
  gap: clamp(1.5rem,4vw,2.75rem);
  padding-bottom: 2.5rem;
}
.f-logo{ display:flex; align-items:baseline; gap:10px; font-family:'Kanit',sans-serif; margin-bottom:14px; }
.f-logo .fl-main{ font-weight:700; font-size:1.5rem; color:#fff; letter-spacing:2px; }
.f-logo .fl-sub{ font-weight:600; font-size:.95rem; color:#8b93ff; letter-spacing:3px; }
.f-brand p{ color:rgba(255,255,255,.6); font-size:.95rem; line-height:1.7; margin:0 0 18px; max-width:360px; }
.f-social{ display:flex; gap:10px; }
.f-social a{
  width:38px; height:38px; border-radius:50%;
  border:1px solid rgba(255,255,255,.18); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-size:.9rem; text-decoration:none; transition:all .25s ease;
}
.f-social a:hover{ background:#4750cf; border-color:#4750cf; }
.site-footer h4{
  font-family:'Kanit',sans-serif; font-size:1.05rem; font-weight:600;
  color:#fff; margin:0 0 16px;
}
.f-links ul{ list-style:none; padding:0; margin:0; }
.f-links li{ margin-bottom:12px; }
.f-links a{ color:rgba(255,255,255,.65); text-decoration:none; font-size:.95rem; transition:color .2s ease; }
.f-links a:hover{ color:#fff; }
.f-contact p{ color:rgba(255,255,255,.65); font-size:.95rem; margin:0 0 10px; line-height:1.6; }
.f-contact a{ color:rgba(255,255,255,.82); text-decoration:none; }
.f-contact a:hover{ color:#fff; }
.footer-bottom{
  max-width:1140px; margin:0 auto;
  padding:20px 0;
  border-top:1px solid rgba(255,255,255,.08);
  color:rgba(255,255,255,.5); font-size:.9rem; text-align:center;
  display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:.5rem;
}
.footer-bottom .footer-sep{ color:rgba(255,255,255,.3); }
.footer-bottom .footer-policy{
  color:rgba(255,255,255,.5); text-decoration:none;
  transition:color .2s ease;
}
.footer-bottom .footer-policy:hover{ color:#fff; }
@media (max-width: 820px){
  .footer-top{ grid-template-columns:1fr; gap:32px; }
}
