/* ══════════════════════════════════════════════════════════════
   about.css — สไตล์สำหรับหน้า About IoTE
   (navbar/hamburger ใช้จาก main.css)
══════════════════════════════════════════════════════════════ */

/* ── 1. RESET & CSS VARIABLES ── */
:root {
  --navy:       #081527;
  --blue:       #0d2545;
  --mid:        #4e74a2;
  --sky:        #6b8bae;
  --light-sky:  #a8c8e0;
  --orange:     #ff8246;
  --white:      #ffffff;
  --text:       #1a2836;
  --muted:      #4a6a8a;
  --border:     #c2d4e8;
  --card-bg:    #edf3f9;
}

/* ── 2. BODY & BACKGROUND ── */
body {
  font-family: 'IBM Plex Sans Thai', 'Prompt', 'IBM Plex Sans', Arial, sans-serif;
  background: linear-gradient(180deg,
    #ffffff  2%,
    #e6e6e6  8%,
    #b8c9d8 22%,
    #6b8bae 38%,
    #4e74a2 51%,
    #1e3a5f 62%,
    #0d2545 72%,
    #0a1a2e 84%,
    #2a2b2c 100%
  );
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
}

@media (max-width: 768px) {
  body { background-attachment: scroll; }
}

/* ── 3. TAB BAR ── */
.tab-area {
  padding: 14px clamp(16px, 4vw, 48px) 16px;
}

.tab-bar {
  display: flex;
  gap: 8px;
  max-width: 1400px;
  margin: 0 auto;
  justify-content: center;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px clamp(16px, 2.5vw, 38px);
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  font-family: 'IBM Plex Sans Thai', 'Prompt', sans-serif;
  font-size: clamp(12px, 1.3vw, 14.5px);
  font-weight: 700;
  color: #1C4D8D;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.tab-btn.active {
  background: #1C4D8D;
  color: white;
  box-shadow: 0 3px 12px rgba(28, 77, 141, 0.4);
}

.tab-btn:hover:not(.active) {
  background: rgba(28, 77, 141, 0.1);
}

/* ── 4. CONTENT SECTIONS ── */
.content-section        { display: none; animation: fadeUp 0.3s ease; }
.content-section.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 5. PAGE WRAP ── */
.page-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px clamp(16px, 4vw, 48px) 64px;
}

/* ── 6. HERO ── */
.hero {
  background: linear-gradient(160deg, #050e1a 0%, #081527 50%, #0d2545 100%);
  padding: clamp(28px, 4vw, 56px) 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  /* reset main.css hero styles */
  height: auto;
  margin-top: 0;
  width: 100%;
  display: block;
  align-items: unset;
  justify-content: unset;
}

.hero::before { display: none; } /* ปิด overlay ของ main.css */

.hero::after {
  content: '';
  position: absolute;
  right: -80px; top: -80px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 159, 212, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(74, 159, 212, 0.2);
  border: 1px solid rgba(74, 159, 212, 0.4);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: clamp(12px, 1vw, 13px);
  font-weight: 600;
  color: var(--light-sky);
  margin-bottom: 16px;
}

.hero h2        { font-size: clamp(22px, 2.8vw, 34px); font-weight: 900; color: white; line-height: 1.3; margin-bottom: 10px; }
.hero .subtitle { font-size: clamp(12px, 1.1vw, 14px); color: rgba(255,255,255,0.5); margin-bottom: 16px; font-weight: 300; }
.hero-desc      { font-size: clamp(13px, 1.2vw, 15px); line-height: 1.9; color: rgba(255,255,255,0.82); font-weight: 300; }

.hero-right-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--light-sky);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.pill-list { display: flex; flex-direction: column; gap: 9px; }

.pill {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 11px 16px;
  font-size: clamp(12.5px, 1.1vw, 14px);
  color: rgba(255, 255, 255, 0.88);
  font-weight: 400;
  line-height: 1.5;
}

/* ── 7. LAYOUT HELPERS ── */
.two-col  { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.full-col { margin-bottom: 20px; }

/* ── 8. CARD ── */
.card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  padding: clamp(20px, 2.5vw, 30px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.14);
}

.card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }

.card-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #081527, #4e74a2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.card-header h3 { font-size: clamp(14px, 1.3vw, 16px); font-weight: 700; color: var(--navy); }

/* ── 9. CURRICULUM ITEMS ── */
.c-item {
  background: var(--card-bg);
  border-left: 3px solid var(--sky);
  border-radius: 0 9px 9px 0;
  padding: 13px 16px;
  margin-bottom: 9px;
}
.c-item:last-child { margin-bottom: 0; }
.c-title { font-size: clamp(13.5px, 1.1vw, 14.5px); font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.c-desc  { font-size: clamp(12px, 1vw, 13.5px); color: var(--muted); line-height: 1.7; font-weight: 300; }

/* ── 10. SECTION LABEL ── */
.section-lbl {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--sky);
  letter-spacing: 0.8px;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-lbl::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── 11. CAREER GRID ── */
.career-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.career-grid.two { grid-template-columns: repeat(2, 1fr); }

.career-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 12px;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
.career-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(26, 58, 92, 0.1); }

.cc-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e4f0fb, #d0e8ff);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px;
}
.cc-icon svg { color: var(--navy); }
.cc-title    { font-size: clamp(11px, 1vw, 13px); font-weight: 600; color: var(--navy); line-height: 1.4; }

/* ── 12. TIMELINE ── */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, var(--sky), rgba(74, 159, 212, 0.1));
}
.tl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.tl-item            { position: relative; margin-bottom: 26px; }
.tl-item:last-child { margin-bottom: 0; }
.tl-dot {
  position: absolute;
  left: -26px; top: 5px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--sky);
  border: 2.5px solid white;
  box-shadow: 0 0 0 2px var(--sky);
}
.tl-year { font-size: clamp(12px, 1vw, 13.5px); font-weight: 700; color: var(--sky); margin-bottom: 5px; }
.tl-text { font-size: clamp(12px, 1vw, 13.5px); color: #445; line-height: 1.85; font-weight: 300; }

/* ── 13. CAROUSEL ── */
.carousel-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #1a3a5c;
  margin-bottom: 14px;
}
.carousel-track { display: flex; transition: transform 0.4s ease; }
.carousel-slide {
  min-width: 100%;
  aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center;
  background: #1a3a5c;
  overflow: hidden;
}
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.carousel-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}
.carousel-btn:hover { background: rgba(255, 255, 255, 0.32); }
.carousel-btn.prev  { left: 12px; }
.carousel-btn.next  { right: 12px; }

.carousel-dots { display: flex; justify-content: center; gap: 7px; }
.cdot         { width: 8px; height: 8px; border-radius: 50%; background: rgba(26, 58, 92, 0.25); cursor: pointer; transition: all 0.3s; }
.cdot.active  { background: var(--mid); width: 22px; border-radius: 4px; }

/* ── 14. STAT & DEGREE BOXES ── */
.stat-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.degree-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.stat-box {
  border-radius: 13px;
  padding: 20px 16px;
  text-align: center;
  background: linear-gradient(135deg, var(--navy), var(--mid));
  color: white;
}
.stat-num  { font-size: clamp(24px, 3vw, 32px); font-weight: 900; color: var(--light-sky); line-height: 1; }
.stat-unit { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 3px; }
.stat-lbl  { font-size: clamp(11px, 1vw, 13px); font-weight: 600; color: rgba(255,255,255,0.8); margin-top: 8px; line-height: 1.4; }

.degree-box {
  border-radius: 13px;
  border: 2px solid var(--border);
  padding: 20px 14px;
  text-align: center;
  background: var(--card-bg);
}
.db-icon {
  width: 46px; height: 46px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--navy), var(--mid));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.db-deg  { font-size: clamp(17px, 2vw, 22px); font-weight: 900; color: var(--navy); }
.db-name { font-size: clamp(11px, 1vw, 13px); color: var(--muted); margin-top: 6px; line-height: 1.5; font-weight: 300; }

/* ── 15. SINGLE DEGREE BOX ── */
.single-deg {
  background: linear-gradient(135deg, var(--navy), var(--mid));
  border-radius: 13px;
  padding: 26px 20px;
  text-align: center;
  margin-bottom: 16px;
}
.sd-icon {
  width: 58px; height: 58px;
  border-radius: 14px;
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.sd-deg  { font-size: clamp(22px, 2.5vw, 28px); font-weight: 900; color: var(--light-sky); }
.sd-name { font-size: clamp(14px, 1.4vw, 17px); font-weight: 700; color: white; margin-top: 5px; }
.sd-sub  { font-size: clamp(11px, 1vw, 13px); color: rgba(255,255,255,0.5); margin-top: 5px; font-weight: 300; }
.sd-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(74, 159, 212, 0.2);
  border: 1px solid rgba(74, 159, 212, 0.35);
  border-radius: 20px;
  padding: 7px 20px;
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 700; color: var(--light-sky);
  margin-top: 14px;
}

/* ── 16. NOTE BOX ── */
.note-box {
  background: #eef5fc;
  border-left: 3px solid var(--sky);
  border-radius: 0 9px 9px 0;
  padding: 14px 18px;
  font-size: clamp(12px, 1.1vw, 13.5px);
  color: #446;
  line-height: 1.9;
  font-weight: 300;
}
.note-box strong { color: var(--navy); font-weight: 700; }

/* ── 17. BADGE GRID ── */
.badge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.badge {
  background: #e4f0fb;
  border: 1px solid #b5d4f0;
  border-radius: 8px;
  padding: 9px 14px;
  text-align: center;
  font-size: clamp(12px, 1.1vw, 13.5px);
  font-weight: 600;
  color: #1a5a9a;
}

/* ══════════════════════════════════════════════════════════════
   18. RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero-layout  { grid-template-columns: 1fr; }
  .two-col      { grid-template-columns: 1fr; }
  .tl-grid      { grid-template-columns: 1fr; }
  .career-grid  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .tab-btn      { padding: 10px 12px; font-size: 11.5px; }
  .career-grid  { grid-template-columns: 1fr 1fr; }
  .stat-row     { grid-template-columns: 1fr 1fr; }
  .page-wrap    { padding: 20px 16px 48px; }
}

/* --- ย้ายมาไว้นอก @media เพื่อให้ทำงานทุกขนาดหน้าจอ --- */

/* 1. บังคับซ่อน sub-menu ในแฮมเบอร์เกอร์เริ่มต้น (ทุกขนาดจอ) */
#subMenu {
    display: none !important; 
}

/* 2. แสดงผลเฉพาะตอนที่ได้รับคลาส 'open' จาก JavaScript เท่านั้น */
#subMenu.open {
    display: flex !important; 
    flex-direction: column;
    padding-left: 20px;
    background: rgba(0, 0, 0, 0.1);
}

/* ปรับแต่งลิงก์ข้างใน sub-menu ให้ดูดีขึ้น */
#subMenu a {
    font-size: 15px !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}


