/* ============ MEGA MENU ============ */
.nav-item-dropdown {
  position: relative;
}
.nav-item-dropdown .dropdown-trigger {
  display: flex;
  align-items: center;
  cursor: pointer;
}
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 900px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(24px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--t);
  display: flex;
  z-index: 200;
  overflow: hidden;
}
.nav-item-dropdown:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.mega-sidebar {
  width: 220px;
  background: var(--bg);
  border-right: 1px solid var(--line);
  padding: 16px 0;
  display: flex;
  flex-direction: column;
}
.mega-cat {
  padding: 12px 24px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all var(--t-fast);
}
.mega-cat:hover, .mega-cat.active {
  background: var(--white);
  color: var(--blue-800);
  border-left-color: var(--blue-600);
}
.mega-content {
  flex: 1;
  padding: 24px 32px;
  position: relative;
  min-height: 380px;
}
.mega-panel {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  animation: fadeUp 0.3s ease;
}
.mega-panel.active {
  display: grid;
}
.mega-col h4 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mega-col ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mega-col ul li a {
  font-size: 0.88rem;
  color: var(--muted);
  transition: color var(--t-fast);
}
.mega-col ul li a:hover {
  color: var(--blue-600);
}
.mega-icon {
  font-size: 1.1rem;
}
.mega-list-plain {
  margin-top: 10px;
}
.mega-list-plain li {
  margin-bottom: 12px;
}
.mega-list-plain li a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--ink) !important;
}
.mega-list-plain li a:hover {
  color: var(--blue-600) !important;
}
.mega-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 60px 0;
  font-style: italic;
}

/* ============ BENTO BOX GRID ============ */
.bento-section {
  padding: 80px 0;
  background: var(--white);
}
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 150px;
  gap: 20px;
}
.bento-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--ink);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  border: 1px solid rgba(15, 27, 71, 0.08);
  background: linear-gradient(135deg, #FFFFFF 0%, #FAFAFA 100%);
  box-shadow: var(--shadow-sm);
}
.bento-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(15, 27, 71, 0.12);
  border-color: rgba(37, 99, 235, 0.25);
}
.bento-card.bento-dark {
  background: linear-gradient(135deg, #070e2b 0%, #12286b 70%, #1e3a8a 100%);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.bento-card.bento-yellow {
  background: linear-gradient(135deg, #FFFBEB 0%, #FDE68A 60%, #FBBF24 100%);
  color: var(--blue-900);
  border: 1px solid rgba(251, 191, 36, 0.2);
}
.bento-card.bento-blue {
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 60%, #C7D2FE 100%);
  color: var(--blue-900);
  border: 1px solid rgba(99, 102, 241, 0.15);
}
.bento-card.bento-green {
  background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 65%, #BBF7D0 100%);
  color: var(--blue-900);
  border: 1px solid rgba(34, 197, 94, 0.15);
}
.bento-card.bento-light {
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 70%, #E2E8F0 100%);
  color: var(--ink);
  border: 1px solid rgba(148, 163, 184, 0.15);
}
.bento-large {
  grid-column: span 2;
  grid-row: span 2;
  padding: 32px;
}
.bento-large h3 {
  font-size: 2.2rem;
}
.bento-tall {
  grid-column: span 1;
  grid-row: span 2;
}
.bento-wide {
  grid-column: span 2;
  grid-row: span 1;
  padding: 24px 32px;
}
.bento-wide h3 {
  font-size: 1.6rem;
}
.bento-small {
  grid-column: span 1;
  grid-row: span 1;
  padding: 20px;
}
.bento-small h3 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}
.bento-small p {
  font-size: 0.85rem;
  margin-bottom: 0;
  opacity: 0.8;
}

.bento-content {
  position: relative;
  z-index: 2;
}
.bento-card h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 8px;
  line-height: 1.1;
  font-weight: 700;
}
.bento-card p {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-bottom: 16px;
}
.bento-btn {
  display: inline-block;
  background: var(--white);
  color: var(--ink);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
}
.bento-dark .bento-btn {
  color: var(--blue-900);
}
.bento-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}
.bento-icon-bg {
  position: absolute;
  right: -5px;
  bottom: -5px;
  font-size: 5rem;
  opacity: 0.12;
  transform: rotate(-10deg);
  transition: transform var(--t-slow);
}
.bento-card:hover .bento-icon-bg {
  transform: rotate(0) scale(1.1);
}

@media (max-width: 900px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .bento-large, .bento-tall, .bento-wide, .bento-small {
    grid-column: span 1;
    grid-row: auto;
    min-height: 280px;
  }
  .mega-menu { display: none; }
}
