@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700&display=swap');

:root {
  --color-primary: #4B0082;       /* Indigo */
  --color-secondary: #37b5ff;     /* Electric Cyan */
  --color-dark: #0B0B0D;          /* Deep Black */
  
  --color-primary-light: rgba(75, 0, 130, 0.06);
  --color-secondary-light: rgba(55, 181, 255, 0.1);
  --color-dark-light: rgba(11, 11, 13, 0.05);
  
  --color-bg-gradient: radial-gradient(circle at 10% 20%, rgba(75, 0, 130, 0.03) 0%, rgba(55, 181, 255, 0.03) 90%);
  --color-body-bg: #f7f8fc;
  --color-card-bg: #ffffff;
  
  --color-text-dark: #0B0B0D;
  --color-text-body: #2f2c35;     /* Dark grey for body text for comfort */
  --color-text-light: #6c6775;    /* Muted text */
  --color-border: #e6e3ed;        /* Soft lilac-tinted border */
  
  --font-sans: 'Noto Sans Thai', sans-serif;
  --font-heading: 'Noto Sans Thai', sans-serif;
  
  --shadow-sm: 0 4px 12px rgba(75, 0, 130, 0.03);
  --shadow-md: 0 10px 30px rgba(75, 0, 130, 0.05), 0 1px 3px rgba(55, 181, 255, 0.05);
  --shadow-lg: 0 20px 40px rgba(75, 0, 130, 0.08), 0 0 20px rgba(55, 181, 255, 0.15);
  
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Material Symbols Rounded Custom Setup */
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--color-body-bg);
  background-image: var(--color-bg-gradient);
  color: var(--color-text-body);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-dark);
  font-weight: 600;
  line-height: 1.4;
}

h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1.25rem;
}

a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--color-primary);
  text-shadow: 0 0 10px rgba(75, 0, 130, 0.1);
}

/* Header / Hero Section */
.hero-header {
  background: linear-gradient(135deg, #ffffff 0%, #f2eff7 100%);
  position: relative;
  overflow: hidden;
  padding: 5.5rem 2rem 4.5rem;
  color: var(--color-text-dark);
  text-align: center;
  margin-bottom: 3.5rem;
  border-bottom: 3px solid var(--color-secondary);
  box-shadow: 0 4px 25px rgba(75, 0, 130, 0.03);
}

/* Glowing decoration circles - AI vibe (Softened for Light Theme) */
.hero-header::before,
.hero-header::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.08;
  pointer-events: none;
}

.hero-header::before {
  width: 320px;
  height: 320px;
  background-color: var(--color-secondary);
  top: -100px;
  left: 5%;
}

.hero-header::after {
  width: 280px;
  height: 280px;
  background-color: #9a4bfa;
  bottom: -100px;
  right: 5%;
}

.hero-container {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(75, 0, 130, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(75, 0, 130, 0.12);
  padding: 0.5rem 1.35rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(75, 0, 130, 0.02);
}

.hero-badge .material-symbols-rounded {
  font-size: 1.15rem;
  color: var(--color-primary);
  font-variation-settings: 'FILL' 0, 'wght' 450, 'GRAD' 0, 'opsz' 24;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1.25rem;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--color-text-body);
  font-weight: 400;
  max-width: 750px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Page Layout */
.main-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 6rem;
}

.layout-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: start;
}

/* Sticky Sidebar navigation */
.sidebar-nav {
  position: sticky;
  top: 2.5rem;
  background: var(--color-card-bg);
  border-radius: var(--border-radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid var(--color-primary-light);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sidebar-title .material-symbols-rounded {
  font-size: 1.35rem;
  color: var(--color-primary);
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius-sm);
  color: var(--color-text-body);
  font-size: 0.95rem;
  font-weight: 400;
  transition: var(--transition-smooth);
  border-left: 3px solid transparent;
}

.sidebar-link .material-symbols-rounded {
  font-size: 1.25rem;
  color: var(--color-text-light);
  transition: var(--transition-smooth);
}

.sidebar-link:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  text-decoration: none;
  padding-left: 1.25rem;
}

.sidebar-link:hover .material-symbols-rounded {
  color: var(--color-primary);
}

.sidebar-link.active {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 600;
  border-left-color: var(--color-primary);
  box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0);
}

.sidebar-link.active .material-symbols-rounded {
  color: var(--color-primary);
  font-variation-settings: 'FILL' 1; /* Filled state for active sidebar icons if desired */
}

/* Content Area */
.content-area {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

/* Content Cards - Glowing AI border */
.policy-card {
  background-color: var(--color-card-bg);
  border-radius: var(--border-radius-md);
  padding: 2.75rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-primary);
  transition: var(--transition-smooth);
  scroll-margin-top: 2.5rem;
}

.policy-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(75, 0, 130, 0.15);
}

/* Card custom theme borders */
.policy-card.card-blue {
  border-top-color: var(--color-secondary);
}

.policy-card.card-orange {
  border-top-color: #f27536; /* orange accent kept for highlights */
}

.card-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 10px rgba(75, 0, 130, 0.05);
}

.card-header-icon .material-symbols-rounded {
  font-size: 1.6rem;
}

.card-blue .card-header-icon {
  background-color: var(--color-secondary-light);
  color: var(--color-secondary);
  box-shadow: 0 4px 10px rgba(55, 181, 255, 0.1);
}

.card-orange .card-header-icon {
  background-color: rgba(242, 117, 54, 0.08);
  color: #f27536;
  box-shadow: 0 4px 10px rgba(242, 117, 54, 0.1);
}

.card-title {
  font-size: 1.55rem;
  color: var(--color-text-dark);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.card-body {
  font-size: 1.05rem;
  color: var(--color-text-body);
}

/* Highlighted Paragraph */
.lead-text {
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--color-text-dark);
}

/* Custom Lists */
.custom-list {
  list-style: none;
  margin: 1.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.custom-list li {
  position: relative;
  padding-left: 2.75rem;
}

.custom-list.numbered-list {
  counter-reset: policy-counter;
}

.custom-list.numbered-list li {
  counter-increment: policy-counter;
}

.custom-list li::before {
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  transition: var(--transition-smooth);
}

/* Bullet list (Checkmarks) using Material Icon style conceptually or simple styled check */
.custom-list.bullet-list li::before {
  content: '✓';
  background-color: var(--color-secondary);
  box-shadow: 0 4px 10px rgba(55, 181, 255, 0.2);
  font-size: 0.85rem;
}

/* Numbered bullets Purple Gradient */
.custom-list.numbered-list li::before {
  content: counter(policy-counter);
  background: linear-gradient(135deg, var(--color-primary) 0%, #681ba3 100%);
  box-shadow: 0 4px 10px rgba(75, 0, 130, 0.2);
}

/* Variant lists */
.card-blue .custom-list.numbered-list li::before {
  background: linear-gradient(135deg, var(--color-secondary) 0%, #159dec 100%);
  box-shadow: 0 4px 10px rgba(55, 181, 255, 0.2);
}

.card-orange .custom-list.numbered-list li::before {
  background: linear-gradient(135deg, #f27536 0%, #e05e1a 100%);
  box-shadow: 0 4px 10px rgba(242, 117, 54, 0.2);
}

/* Processing bases layout (Grid) */
.bases-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.base-item {
  background-color: #faf9fd;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  padding: 1.75rem;
  position: relative;
  transition: var(--transition-smooth);
}

.base-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--color-primary);
  border-top-left-radius: var(--border-radius-sm);
  border-bottom-left-radius: var(--border-radius-sm);
}

.base-item:hover {
  background-color: #ffffff;
  box-shadow: var(--shadow-sm);
  border-color: rgba(75, 0, 130, 0.2);
}

.base-item-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.base-item-title .material-symbols-rounded {
  font-size: 1.35rem;
  color: var(--color-primary);
}

.base-item-title span {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--color-text-light);
  font-weight: 400;
  margin-left: 0.25rem;
}

/* Contact Info Layout */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
  margin-top: 1.75rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.25rem;
  background: #fbfbfc;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  transition: var(--transition-smooth);
}

.contact-item:hover {
  border-color: var(--color-secondary);
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(55, 181, 255, 0.08);
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background-color: var(--color-secondary-light);
  color: var(--color-secondary);
  flex-shrink: 0;
}

.contact-icon .material-symbols-rounded {
  font-size: 1.35rem;
}

.contact-details h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--color-text-dark);
}

.contact-details p {
  margin-bottom: 0;
  font-size: 0.95rem;
  color: var(--color-text-body);
}

/* DPO Notice section - AI Glow */
.dpo-notice {
  background: linear-gradient(135deg, rgba(242, 117, 54, 0.05) 0%, rgba(242, 117, 54, 0.01) 100%);
  border: 1px dashed rgba(242, 117, 54, 0.4);
  border-radius: var(--border-radius-sm);
  padding: 1.75rem;
  margin-top: 1.75rem;
  position: relative;
}

.dpo-notice::before {
  content: 'info';
  font-family: 'Material Symbols Rounded';
  font-size: 2.5rem;
  font-weight: normal;
  font-variation-settings: 'FILL' 0, 'wght' 200, 'GRAD' 0, 'opsz' 48;
  position: absolute;
  right: 1.5rem;
  top: 1.25rem;
  color: #f27536;
  opacity: 0.15;
  pointer-events: none;
}

/* Last updated footer */
.last-updated {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.last-updated .material-symbols-rounded {
  font-size: 1.2rem;
  color: #f27536;
  margin-right: 0.35rem;
}

/* Mobile Quick Navigation Toggle (Bottom fixed on mobile) */
.mobile-nav-toggle {
  display: none;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  box-shadow: 0 6px 24px rgba(75, 0, 130, 0.3);
  z-index: 999;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.mobile-nav-toggle .material-symbols-rounded {
  font-size: 1.6rem;
}

.mobile-nav-toggle:hover {
  transform: scale(1.05);
  background-color: #3b0066;
  box-shadow: 0 8px 30px rgba(75, 0, 130, 0.4);
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(to right, var(--color-primary), var(--color-secondary), #9a4bfa);
  width: 0%;
  z-index: 1000;
  transition: width 0.15s ease;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .layout-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  
  .sidebar-nav {
    display: none; /* Hide on mobile/tablet, use mobile menu drawer instead */
  }
  
  .mobile-nav-toggle {
    display: flex;
  }
  
  .hero-title {
    font-size: 2.25rem;
  }
  
  .hero-header {
    padding: 5rem 1.5rem 4rem;
  }
  
  .policy-card {
    padding: 2rem;
  }
}

/* Sidebar Drawer for Mobile */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100%;
  background: var(--color-card-bg);
  box-shadow: -8px 0 35px rgba(0,0,0,0.15);
  z-index: 1001;
  transition: var(--transition-smooth);
  padding: 2.5rem 1.75rem;
  overflow-y: auto;
}

.mobile-drawer.open {
  right: 0;
}

.mobile-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 11, 13, 0.4);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.mobile-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-drawer-close:hover {
  color: var(--color-primary);
}

.mobile-drawer .sidebar-menu {
  margin-top: 2.5rem;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  box-shadow: 0 4px 15px rgba(75, 0, 130, 0.2);
  z-index: 998;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  opacity: 0;
  visibility: hidden;
}

.back-to-top .material-symbols-rounded {
  font-size: 1.5rem;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: #3b0066;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(75, 0, 130, 0.3);
}

@media (max-width: 992px) {
  .back-to-top {
    bottom: 7.5rem; /* Stack above the mobile nav toggle (which is bottom 2rem, height 60px) */
    right: 2.35rem;
    width: 48px;
    height: 48px;
  }
}
