@import url('https://fonts.googleapis.com/css2?family=Kanit&display=swap');

.eservice-container {
  max-width: 1400px;
  margin: 0 auto 60px;
  padding: 40px 0;
}

.eservice-header {
  padding-bottom: 20px;
}

.eservice-header h2 {
  margin: 0;
  font-weight: 700;
  font-size: 1.8rem;
  text-align: center;
  background: linear-gradient(90deg, #2e7d32, #c0a040);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  transition: all 0.3s ease;
}

.eservice-divider {
  max-width: 1400px;
  margin: 0 0 30px;
  border: none;
  border-top: 2px solid #2e7d32;
  margin-left: auto;
  margin-right: auto;
}

.eservice-tabs {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  gap: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid #ddd;
  font-weight: 600;
  scrollbar-width: thin;
  scrollbar-color: #2e7d32 #f0f0f0;
}

.eservice-tabs::-webkit-scrollbar {
  height: 6px;
}

.eservice-tabs::-webkit-scrollbar-track {
  background: #f0f0f0;
}

.eservice-tabs::-webkit-scrollbar-thumb {
  background-color: #2e7d32;
  border-radius: 3px;
}

.eservice-tab {
  flex: 0 0 auto;
  background: transparent;
  color: #555;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  font-family: 'Kanit', sans-serif;
  font-size: 1rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.35s ease;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.eservice-tab .icon {
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.eservice-tab:hover {
  color: #1b5e20;
}

.eservice-tab:hover .icon {
  transform: scale(1.2);
}

.eservice-tab.active {
  color: #2e7d32;
  font-weight: 700;
  border-bottom: 4px solid #2e7d32;
  box-shadow: 0 6px 12px rgba(46, 125, 50, 0.35);
}

.eservice-content {
  background: #f9f7fa;
  padding: 30px 35px;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(46, 125, 50, 0.12);
  min-height: 300px;
  transition: opacity 0.4s ease;
}

.eservice-panel {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.eservice-panel.active {
  display: block;
  opacity: 1;
}

.eservice-panel h3 {
  color: #2e7d32;
  margin-bottom: 20px;
  font-weight: 700;
  font-size: 1.3rem;
}

.eservice-panel p {
  font-size: 1rem;
  line-height: 1.5;
  color: #444;
  margin-bottom: 20px;
}

.eservice-subsystem {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
}

.eservice-subsystem a {
  flex: 1 1 270px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(46, 125, 50, 0.2);
  padding: 30px 30px;
  display: flex;
  align-items: center;
  gap: 25px;
  color: #1b5e20;
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
  transition: box-shadow 0.4s ease, transform 0.3s ease;
  border-left: 6px solid transparent;
  min-height: 150px;
  box-sizing: border-box;
}

.eservice-subsystem a:hover {
  box-shadow: 0 15px 40px rgba(46, 125, 50, 0.35);
  transform: translateY(-7px);
  border-left-color: #c0a040;
}
.eservice-subsystem a .icon i {
  font-size: 3.2rem;
  width: 64px;
  height: 64px;
  line-height: 64px;
  text-align: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, #2e7d32, #c0a040);
  box-shadow: 0 7px 20px rgba(46, 125, 50, 0.65);
  transition: background 0.4s ease;
  display: inline-block;
}

.eservice-subsystem a:hover .icon i {
  background: linear-gradient(135deg, #c0a040, #2e7d32);
}

.eservice-subsystem a .text-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eservice-subsystem a .text-content .title {
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
}

.eservice-subsystem a .text-content small {
  display: block;
  font-weight: 400;
  font-size: 0.9rem;
  color: #666;
  margin-top: 6px;
  line-height: 1.4;
}
/* ================= DARK MODE ================= */
body.dark-mode {
  background: #121212;
  color: #e0e0e0;
}

/* Header */
body.dark-mode .eservice-header h2 {
  background: linear-gradient(90deg, #c0a040, #2e7d32);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Divider */
body.dark-mode .eservice-divider {
  border-top: 2px solid #c0a040;
}

/* Tabs */
body.dark-mode .eservice-tabs {
  border-bottom: 1px solid #333;
  scrollbar-color: #c0a040 #1e1e1e;
}
body.dark-mode .eservice-tabs::-webkit-scrollbar-track {
  background: #1e1e1e;
}
body.dark-mode .eservice-tabs::-webkit-scrollbar-thumb {
  background-color: #c0a040;
}

body.dark-mode .eservice-tab {
  color: #aaa;
}
body.dark-mode .eservice-tab:hover {
  color: #c0a040;
}
body.dark-mode .eservice-tab.active {
  color: #c0a040;
  border-bottom: 4px solid #c0a040;
  box-shadow: 0 6px 12px rgba(192,160,64,0.35);
}

/* Content */
body.dark-mode .eservice-content {
  background: #1e1e1e;
  box-shadow: 0 8px 20px rgba(192,160,64,0.15);
}

/* Panels */
body.dark-mode .eservice-panel h3 {
  color: #c0a040;
}
body.dark-mode .eservice-panel p {
  color: #ccc;
}

/* Subsystem Cards */
body.dark-mode .eservice-subsystem a {
  background: #1a1a1a;
  color: #c0a040;
  box-shadow: 0 10px 25px rgba(192,160,64,0.2);
  border-left-color: transparent;
}
body.dark-mode .eservice-subsystem a:hover {
  box-shadow: 0 15px 40px rgba(192,160,64,0.4);
  border-left-color: #2e7d32;
}
body.dark-mode .eservice-subsystem a .icon i {
  background: linear-gradient(135deg, #c0a040, #2e7d32);
  box-shadow: 0 7px 20px rgba(192,160,64,0.55);
}
body.dark-mode .eservice-subsystem a:hover .icon i {
  background: linear-gradient(135deg, #2e7d32, #c0a040);
}
body.dark-mode .eservice-subsystem a .text-content .title {
  color: #f0f0f0;
}
body.dark-mode .eservice-subsystem a .text-content small {
  color: #aaa;
}
