@charset "UTF-8";

/* ==========================================================================
   Parrot Theme: Core Variables & Base Styles
   ========================================================================== */
:root {
  --parrot-green: #059669;
  --parrot-emerald: #10b981;
  --parrot-gold: #f59e0b;
  --parrot-yellow: #fbbf24;
  --parrot-scarlet: #e11d48;
  --parrot-deep-blue: #0f172a;
  --parrot-menu-bg: #131c2e;
  --parrot-border: #1e293b;
}

body {
  font-family: 'Prompt', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(180deg, #f0fdf4 0%, #f8fafc 300px, #f1f5f9 100%);
  min-height: 100vh;
}

/* ==========================================================================
   Top Navigation Link
   ========================================================================== */
.nav-link {
  color: #1e293b;
  text-decoration: none;
  position: relative;
  font-weight: 500;
  transition: all 0.25s ease;
}

.nav-link:hover,
.nav-dropdown-item:hover > .nav-link {
  color: var(--parrot-green);
}

.nav-link i {
  color: #94a3b8;
  transition: transform 0.25s ease, color 0.25s ease;
}

.nav-dropdown-item:hover > .nav-link i {
  color: var(--parrot-gold);
  transform: rotate(180deg);
}

/* แถบเส้นสีรุ้งนกแก้วใต้เมนูเมื่อ Hover */
.nav-dropdown-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--parrot-green), var(--parrot-gold), var(--parrot-scarlet));
  border-radius: 999px;
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.nav-dropdown-item:hover::after {
  width: 80%;
}

/* ==========================================================================
   Level 1 Dropdown Menu (แผงสีกรมท่าลึกเหลือบปีกนกแก้ว)
   ========================================================================== */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: var(--parrot-menu-bg);
  padding: 6px 0;
  margin: 0;
  list-style: none;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 20px 35px -10px rgba(15, 23, 42, 0.4), 
              0 0 0 1px rgba(255, 255, 255, 0.08);
  border-top: 3px solid var(--parrot-gold); /* สันขอบสีทอง */
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
              visibility 0.22s;
  z-index: 50;
}

.nav-dropdown-item:hover > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: block;
  padding: 11px 20px;
  color: #e2e8f0;
  font-size: 13.5px;
  font-weight: 400;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  position: relative;
  transition: all 0.2s ease;
}

.dropdown-link:hover {
  background: linear-gradient(90deg, rgba(5, 150, 105, 0.25) 0%, rgba(245, 158, 11, 0.1) 100%);
  color: #ffffff;
  padding-left: 24px;
}

/* ==========================================================================
   Level 2 Submenu (Flyout สีนกแก้วกางออกทางขวา)
   ========================================================================== */
.nested-submenu {
  position: absolute;
  top: -6px;
  left: 100%;
  min-width: 230px;
  background: #0d1524;
  padding: 6px 0;
  margin: 0;
  list-style: none;
  border-radius: 10px;
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--parrot-scarlet); /* เส้นขอบข้างสีแดงชาดมาคอว์ */
  opacity: 0;
  visibility: hidden;
  transform: translateX(-8px);
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
              visibility 0.22s;
  z-index: 51;
}

.nav-nested-item:hover > .nested-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(4px);
}

/* ตัวหนังสือสีทองและขีดเส้นใต้สีเขียวมรกตเมื่อ Hover กลุ่มแม่ */
.nav-nested-item:hover > .dropdown-link {
  color: var(--parrot-yellow);
  background: rgba(16, 185, 129, 0.15);
}

.nav-nested-item:hover > .dropdown-link > span {
  position: relative;
}

.nav-nested-item:hover > .dropdown-link > span::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--parrot-emerald), var(--parrot-gold));
  border-radius: 2px;
}

/* ==========================================================================
   Mobile Accordion Menu
   ========================================================================== */
.mobile-nav-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 10px;
  color: #cbd5e1;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  transition: color 0.2s ease;
}

.mobile-nav-link:hover {
  color: var(--parrot-gold);
}

.mobile-sub-menu {
  background-color: #0d1524;
  padding-left: 12px;
}