/* ============================================================
   CKK-XPERT — Design System & Styles
   eXperience & Professional Education Readiness and Training
   โรงเรียนจักรคำคณาทร จ.ลำพูน
   ============================================================ */

/* --- Google Font --- */
@import url('https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Primary Navy */
  --primary:        #1B2A6B;
  --primary-dark:   #0F1A47;
  --primary-darker: #0A1133;
  --primary-light:  #2E4399;
  --primary-ultra-light: #E8EDF5;

  /* Gold */
  --gold:           #D4A843;
  --gold-dark:      #B8922E;
  --gold-light:     #F0D68A;
  --gold-ultra-light: #FBF3DD;

  /* Accent */
  --accent-pink:    #E91E8C;
  --accent-teal:    #0EA5A0;

  /* Backgrounds */
  --bg-body:        #F5F7FB;
  --bg-card:        #FFFFFF;
  --bg-sidebar:     #0F1A47;

  /* Text */
  --text-dark:      #1A1A2E;
  --text-body:      #374151;
  --text-muted:     #6B7280;
  --text-light:     #FFFFFF;
  --text-gold:      #D4A843;

  /* Shadows */
  --shadow-sm:      0 2px 8px rgba(27, 42, 107, 0.06);
  --shadow-md:      0 4px 16px rgba(27, 42, 107, 0.10);
  --shadow-lg:      0 8px 32px rgba(27, 42, 107, 0.14);
  --shadow-gold:    0 4px 20px rgba(212, 168, 67, 0.3);

  /* Borders */
  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      20px;
  --radius-xl:      28px;
  --radius-round:   50%;

  /* Sidebar */
  --sidebar-width:  72px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-med:  0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Prompt', sans-serif;
  background: var(--bg-body);
  color: var(--text-body);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

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

ul, ol {
  list-style: none;
}

/* --- Scrollbar Custom --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--primary-ultra-light);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
  border-radius: 4px;
}

/* ============================================================
   SIDEBAR NAVIGATION
   ============================================================ */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary-darker) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  z-index: 1000;
  box-shadow: 4px 0 24px rgba(15, 26, 71, 0.25);
}

.sidebar__logo {
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  color: var(--primary-dark);
  letter-spacing: -0.5px;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.sidebar__logo:hover {
  transform: scale(1.08);
}

.sidebar__version {
  font-size: 9px;
  color: var(--gold-light);
  font-weight: 500;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.sidebar__divider {
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0.3), transparent);
  margin-bottom: 16px;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sidebar__item {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.5);
  font-size: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sidebar__item svg {
  display: block;
  width: 22px;
  height: 22px;
  flex: none;
}

.sidebar__item:hover,
.sidebar__item.active {
  background: rgba(212, 168, 67, 0.15);
  color: var(--gold);
}

.sidebar__item.active {
  background: rgba(212, 168, 67, 0.2);
}

.sidebar__item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  width: 4px;
  height: 24px;
  background: var(--gold);
  border-radius: 0 4px 4px 0;
}

/* Tooltip */
.sidebar__tooltip {
  position: absolute;
  left: calc(100% + 12px);
  background: var(--primary-dark);
  color: var(--text-light);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
  z-index: 1001;
}

.sidebar__tooltip::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right-color: var(--primary-dark);
  border-left: none;
}

.sidebar__item:hover .sidebar__tooltip {
  opacity: 1;
  transform: translateX(0);
}

.sidebar__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 520px;
  background: linear-gradient(135deg, #F5F7FB 0%, #E8EDF5 40%, #DFE7F3 100%);
  display: flex;
  align-items: center;
  padding: 60px 60px 60px 80px;
  overflow: hidden;
}

/* Decorative background elements */
.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -60px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(27, 42, 107, 0.04) 0%, transparent 70%);
  border-radius: 50%;
}

.hero__decoration {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.hero__decoration--top-right {
  top: -20px;
  right: 40px;
  width: 220px;
  opacity: 0.6;
  transform: rotate(15deg);
}

.hero__decoration--bottom-left {
  bottom: -30px;
  left: 80px;
  width: 180px;
  opacity: 0.4;
  transform: rotate(-25deg) scaleX(-1);
}

/* Floating shapes */
.hero__float {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  animation: float 6s ease-in-out infinite;
}

.hero__float--1 {
  width: 120px;
  height: 120px;
  background: var(--gold);
  top: 10%;
  right: 15%;
  animation-delay: 0s;
}

.hero__float--2 {
  width: 80px;
  height: 80px;
  background: var(--primary);
  top: 60%;
  right: 5%;
  animation-delay: -2s;
}

.hero__float--3 {
  width: 60px;
  height: 60px;
  background: var(--accent-teal);
  bottom: 15%;
  left: 45%;
  animation-delay: -4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* Wave divider */
.hero__wave {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  z-index: 5;
}

.hero__wave svg {
  display: block;
  width: 100%;
  height: 60px;
}

/* Hero content */
.hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.hero__text {
  max-width: 580px;
  animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

.hero__logos {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.hero__logo-img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-round);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  border: 2px solid rgba(212, 168, 67, 0.3);
}

.hero__brand {
  display: flex;
  flex-direction: column;
}

.hero__brand-site {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hero__brand-site svg {
  width: 14px;
  height: 14px;
}

.hero__system-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
}

.hero__name-ckk {
  font-size: 48px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -1px;
  line-height: 1.1;
}

.hero__name-xpert {
  font-size: 48px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  line-height: 1.1;
}

.hero__name-x {
  color: var(--gold);
}

.hero__title-en {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.hero__title-th {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.hero__subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.8;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--primary-dark);
  font-family: 'Prompt', sans-serif;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: all var(--transition-med);
  position: relative;
  overflow: hidden;
}

.hero__cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.hero__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 168, 67, 0.45);
}

.hero__cta:hover::before {
  left: 100%;
}

.hero__cta-icon {
  width: 28px;
  height: 28px;
  background: rgba(15, 26, 71, 0.15);
  border-radius: var(--radius-round);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: transform var(--transition-fast);
}

.hero__cta:hover .hero__cta-icon {
  transform: translateX(4px);
}

/* Hero illustration */
.hero__illustration {
  max-width: 480px;
  width: 45%;
  animation: slideInRight 0.8s ease-out;
  position: relative;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

.hero__illustration img {
  width: 100%;
  filter: drop-shadow(0 10px 30px rgba(27, 42, 107, 0.08));
}

/* ============================================================
   STATISTICS BAR
   ============================================================ */
.stats {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 40px 60px;
  position: relative;
  overflow: hidden;
}

.stats::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(212, 168, 67, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.stats__item {
  text-align: center;
  padding: 8px;
}

.stats__number {
  font-size: 40px;
  font-weight: 800;
  color: var(--gold);
  line-height: 1.2;
  margin-bottom: 4px;
}

.stats__number span {
  font-size: 24px;
  font-weight: 500;
}

.stats__label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 300;
}

/* Divider between stats */
.stats__item + .stats__item {
  position: relative;
}

.stats__item + .stats__item::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 10%;
  height: 80%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(212, 168, 67, 0.3), transparent);
}

/* ============================================================
   SECTION COMMON
   ============================================================ */
.section {
  padding: 80px 60px;
  max-width: calc(1300px + 120px);
  margin: 0 auto;
}

.section__header {
  text-align: center;
  margin-bottom: 56px;
}

.section__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 18px;
  background: var(--gold-ultra-light);
  color: var(--gold-dark);
  border-radius: 30px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  border: 1px solid rgba(212, 168, 67, 0.2);
}

.section__badge svg {
  width: 16px;
  height: 16px;
}

.section__title {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.section__subtitle {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================================
   FEATURE CARDS
   ============================================================ */
.features__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  border: 1px solid rgba(27, 42, 107, 0.06);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-med);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(212, 168, 67, 0.2);
}

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

.feature-card__icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 28px;
  background: var(--primary-ultra-light);
  transition: all var(--transition-med);
}

.feature-card:hover .feature-card__icon {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--text-light);
  transform: scale(1.05);
}

.feature-card__icon--register { background: #EEF2FF; color: var(--primary); }
.feature-card__icon--search   { background: #FEF3E2; color: var(--gold-dark); }
.feature-card__icon--track    { background: #E6F9F8; color: var(--accent-teal); }
.feature-card__icon--report   { background: #FDE8F4; color: var(--accent-pink); }

.feature-card:hover .feature-card__icon--register,
.feature-card:hover .feature-card__icon--search,
.feature-card:hover .feature-card__icon--track,
.feature-card:hover .feature-card__icon--report {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--text-light);
}

.feature-card__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.feature-card__desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================================
   TIMELINE SECTION
   ============================================================ */
.timeline-section {
  background: linear-gradient(180deg, var(--bg-body) 0%, var(--primary-ultra-light) 100%);
}

.timeline {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
  position: relative;
  padding: 20px 0;
}

/* Connecting line */
.timeline::before {
  content: '';
  position: absolute;
  top: 44px;
  left: 12%;
  right: 12%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-ultra-light), var(--primary), var(--gold), var(--primary), var(--primary-ultra-light));
  border-radius: 2px;
  z-index: 1;
}

.timeline__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  position: relative;
  z-index: 2;
  padding: 0 12px;
}

.timeline__dot {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-round);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  transition: all var(--transition-med);
  position: relative;
}

.timeline__dot--navy {
  background: var(--primary);
  color: var(--text-light);
  box-shadow: 0 4px 16px rgba(27, 42, 107, 0.25);
}

.timeline__dot--gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(212, 168, 67, 0.3);
}

.timeline__dot--teal {
  background: var(--accent-teal);
  color: white;
  box-shadow: 0 4px 16px rgba(14, 165, 160, 0.25);
}

/* Pulse ring on active/hover */
.timeline__step:hover .timeline__dot {
  transform: scale(1.1);
}

.timeline__step:hover .timeline__dot::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0.3;
  animation: pulseRing 1.5s ease-out infinite;
}

@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.3; }
  100% { transform: scale(1.3); opacity: 0; }
}

.timeline__label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.timeline__desc {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 140px;
  line-height: 1.6;
}

/* Arrow between steps */
.timeline__arrow {
  display: none; /* shown in desktop via flex */
}

/* ============================================================
   ROLES SECTION
   ============================================================ */
.roles__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.role-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  border: 1px solid rgba(27, 42, 107, 0.06);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-med);
  position: relative;
  overflow: hidden;
}

.role-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  opacity: 0;
  transition: opacity var(--transition-med);
}

.role-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.role-card:hover::after {
  opacity: 1;
}

.role-card__avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-round);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 36px;
  position: relative;
}

.role-card__avatar--student {
  background: linear-gradient(135deg, #EEF2FF, #D6DFFF);
}

.role-card__avatar--teacher {
  background: linear-gradient(135deg, #FEF3E2, #FDDCAB);
}

.role-card__avatar--company {
  background: linear-gradient(135deg, #E6F9F8, #B5EDEB);
}

.role-card__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.role-card__desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.7;
}

.role-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: var(--radius-xl);
  font-family: 'Prompt', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  transition: all var(--transition-fast);
}

.role-card__btn:hover {
  background: var(--primary);
  color: var(--text-light);
  box-shadow: var(--shadow-md);
}

/* ============================================================
   NEWS SECTION
   ============================================================ */
.news-section {
  background: var(--primary-ultra-light);
}

.news__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.news-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(27, 42, 107, 0.05);
  transition: all var(--transition-med);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.news-card__image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 40px;
}

.news-card__body {
  padding: 24px;
}

.news-card__date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.news-card__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__excerpt {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.news-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  transition: color var(--transition-fast), gap var(--transition-fast);
}

.news-card__link:hover {
  color: var(--gold-dark);
  gap: 10px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary-darker) 100%);
  padding: 60px 60px 30px;
  color: rgba(255, 255, 255, 0.7);
}

.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer__logos {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer__logo-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-round);
  object-fit: cover;
  border: 2px solid rgba(212, 168, 67, 0.3);
}

.footer__brand-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-light);
}

.footer__brand-desc {
  font-size: 13px;
  line-height: 1.8;
  max-width: 320px;
}

.footer__heading {
  font-size: 15px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 20px;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer__links a:hover {
  color: var(--gold-light);
  transform: translateX(4px);
}

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  margin-bottom: 12px;
  line-height: 1.7;
}

.footer__contact-icon {
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  color: var(--gold);
  margin-top: 2px;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 13px;
}

.footer__social {
  display: flex;
  gap: 12px;
}

.footer__social-link {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-round);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  transition: all var(--transition-fast);
}

.footer__social-link:hover {
  background: var(--gold);
  color: var(--primary-dark);
  transform: translateY(-2px);
}

/* ============================================================
   SCROLL ANIMATIONS (reveal on scroll)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
  .sidebar {
    width: 60px;
  }
  
  .main-content {
    margin-left: 60px;
  }

  .hero {
    padding: 40px 40px 40px 50px;
    min-height: 440px;
  }

  .hero__name-ckk,
  .hero__name-xpert {
    font-size: 36px;
  }

  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .roles__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .roles__grid .role-card:last-child {
    grid-column: 1 / -1;
    max-width: 400px;
    margin: 0 auto;
  }

  .news__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__top {
    grid-template-columns: 1fr 1fr;
  }

  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline::before {
    display: none;
  }

  .timeline {
    flex-direction: column;
    gap: 24px;
    align-items: center;
  }

  .timeline__step {
    flex-direction: row;
    text-align: left;
    gap: 16px;
    max-width: 360px;
    width: 100%;
  }

  .timeline__dot {
    margin-bottom: 0;
    flex-shrink: 0;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    width: 100%;
    height: 64px;
    flex-direction: row;
    padding: 0 8px;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 24px rgba(15, 26, 71, 0.2);
  }

  .sidebar__logo,
  .sidebar__version,
  .sidebar__divider,
  .sidebar__bottom {
    display: none;
  }

  .sidebar__nav {
    flex-direction: row;
    gap: 2px;
    width: 100%;
    justify-content: space-around;
  }

  .sidebar__item {
    width: 52px;
    height: 52px;
    font-size: 18px;
  }

  .sidebar__item.active::before {
    left: 50%;
    top: -4px;
    bottom: auto;
    width: 24px;
    height: 4px;
    transform: translateX(-50%);
    border-radius: 0 0 4px 4px;
  }

  .sidebar__tooltip {
    display: none;
  }

  .main-content {
    margin-left: 0;
    padding-bottom: 80px; /* space for bottom nav */
  }

  .hero {
    padding: 32px 20px 50px;
    min-height: auto;
  }

  .hero__inner {
    flex-direction: column;
    gap: 32px;
  }

  .hero__text {
    max-width: 100%;
    text-align: center;
  }

  .hero__logos {
    justify-content: center;
  }

  .hero__system-name {
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
  }

  .hero__name-ckk,
  .hero__name-xpert {
    font-size: 32px;
  }

  .hero__title-en {
    font-size: 13px;
    text-align: center;
  }

  .hero__title-th {
    font-size: 15px;
    text-align: center;
  }

  .hero__subtitle {
    text-align: center;
    font-size: 13px;
  }

  .hero__cta {
    margin: 0 auto;
    display: flex;
    width: fit-content;
  }

  .hero__illustration {
    width: 80%;
    max-width: 340px;
    margin: 0 auto;
  }

  .section {
    padding: 50px 20px;
  }

  .section__title {
    font-size: 24px;
  }

  .features__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .roles__grid {
    grid-template-columns: 1fr;
  }

  .roles__grid .role-card:last-child {
    max-width: 100%;
  }

  .news__grid {
    grid-template-columns: 1fr;
  }

  .stats {
    padding: 32px 20px;
  }

  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .stats__number {
    font-size: 30px;
  }

  .footer {
    padding: 40px 20px 20px;
  }

  .footer__top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero__name-ckk,
  .hero__name-xpert {
    font-size: 26px;
  }
  
  .hero__cta {
    font-size: 14px;
    padding: 12px 24px;
  }
}
