/* CNM Branding Theme - Based on Logo Colors */
:root {
  --cnm-primary: #1a5490;
  --cnm-primary-light: #2d7ab8;
  --cnm-gold: #d4a574;
  --cnm-dark: #1e2936;
  --cnm-light: #f5f7fa;
  --cnm-text-primary: #2c3e50;
  --cnm-text-secondary: #7f8c8d;
  --cnm-border: #e0e4e8;
}

/* Navbar/Header Styling */
.navbar.navbar-dark.bg-dark {
  background: linear-gradient(90deg, var(--cnm-primary) 0%, var(--cnm-primary-light) 100%) !important;
  box-shadow: 0 2px 8px rgba(26, 84, 144, 0.15);
  padding: 0.75rem 0;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 56px;
  left: 0;
  width: 70px;
  height: 100vh;
  background: linear-gradient(180deg, var(--cnm-dark) 0%, #2a3f5f 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 1rem;
  transition: transform 0.3s ease;
  z-index: 1;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
}

.sidebar.show {
  transform: translateX(0);
}

.sidebar a,
.menu-toggle {
  width: 100%;
  padding: 15px 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.5rem;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.sidebar a:hover,
.menu-toggle:hover {
  background-color: rgba(212, 165, 116, 0.1);
  color: var(--cnm-gold);
  border-left-color: var(--cnm-gold);
}

/* Menu Item */
.menu-item {
  position: relative;
  width: 100%;
}

/* Submenu (Fly-out) */
.submenu {
  position: absolute;
  top: 0;
  left: 70px;
  min-width: 180px;
  background: linear-gradient(180deg, var(--cnm-primary) 0%, var(--cnm-primary-light) 100%);
  border-radius: 0 6px 6px 0;
  box-shadow: 0 8px 20px rgba(26, 84, 144, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  padding: 8px 0;
}

/* Show submenu on hover */
.menu-item:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.submenu a {
  display: block;
  padding: 10px 16px;
  font-size: 16px;
  color: white;
  text-align: left;
  transition: all 0.2s ease;
  text-decoration: none;
}

.submenu a:hover {
  background-color: rgba(212, 165, 116, 0.2);
  color: var(--cnm-gold);
  padding-left: 20px;
}

/* Navigation Icons */
.nav-icon {
  cursor: pointer;
  transition: transform 0.3s ease, color 0.3s ease;
  color: white;
}

.nav-icon:hover {
  transform: scale(1.25) rotate(5deg);
  color: var(--cnm-gold);
}

/* Primary Button Styling */
.btn-primary {
  background-color: var(--cnm-primary);
  border-color: var(--cnm-primary);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--cnm-primary-light);
  border-color: var(--cnm-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 84, 144, 0.3);
}

.btn-primary:focus,
.btn-primary.focus {
  background-color: var(--cnm-primary-light);
  border-color: var(--cnm-primary-light);
  box-shadow: 0 0 0 0.2rem rgba(26, 84, 144, 0.25);
}

/* Accent/Gold Elements */
.bg-gold {
  background-color: var(--cnm-gold) !important;
}

.text-gold {
  color: var(--cnm-gold) !important;
}

/* Card Styling with Theme Colors */
.card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.card-header {
  background: linear-gradient(90deg, var(--cnm-primary) 0%, var(--cnm-primary-light) 100%);
  border-bottom: none;
  color: white;
  font-weight: 600;
}

/* Form Controls */
.form-control:focus,
.form-select:focus {
  border-color: var(--cnm-primary);
  box-shadow: 0 0 0 0.2rem rgba(26, 84, 144, 0.25);
}

/* Links */
a {
  color: var(--cnm-primary);
  transition: color 0.2s ease;
}

a:hover {
  color: var(--cnm-primary-light);
}

/* Badge/Pill styling */
.badge-primary {
  background-color: var(--cnm-primary);
}

/* Footer - Already has gradient, but ensure consistency */
.footer {
  position: relative;
  border-top: 3px solid var(--cnm-gold);
  background: linear-gradient(135deg, var(--cnm-primary) 0%, var(--cnm-primary-light) 100%);
  box-shadow: 0 -4px 12px rgba(26, 84, 144, 0.15);
}

.footer .link-group h4 {
  color: var(--cnm-gold);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.footer .link-group a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer .link-group a:hover {
  color: var(--cnm-gold);
  transform: translateX(5px);
}

/* Media Queries */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
}
