/**
 * Modern Theme for Antmole.com
 * Base color scheme, navbar, and UI components
 */

/* ============================================
   CSS Variables - Base Color Scheme
   ============================================ */
:root {
  /* Primary Brand Colors - Enterprise Blue */
  --primary: #0f62fe;        /* IBM Blue - Trust, Professional */
  --primary-dark: #0353e9;   /* Darker blue for hover */
  --primary-light: #4589ff;  /* Lighter blue for accents */
  
  /* Secondary Colors */
  --secondary: #0043ce;      /* Deep Navy - Corporate */
  --success: #198038;        /* Green - Success states */
  --danger: #da1e28;         /* Red - Errors/Alerts */
  --warning: #f1c21b;        /* Amber - Warnings */
  --info: #0072c3;           /* Blue - Info */
  
  /* Neutral Colors - Light Mode */
  --bg-primary: #ffffff;
  --bg-secondary: #f4f7fa;
  --bg-tertiary: #e5e9f2;
  --text-primary: #161616;
  --text-secondary: #525252;
  --text-tertiary: #a8a8a8;
  --border-color: #e0e0e0;
  
  /* Navbar Colors */
  --navbar-bg: #161616;      /* Dark navbar background */
  --navbar-text: #ffffff;
  --navbar-hover: #0f62fe;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.15);
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ============================================
   Dark Mode Colors
   ============================================ */
[data-bs-theme="dark"] {
  --bg-primary: #161616;
  --bg-secondary: #262626;
  --bg-tertiary: #393939;
  --text-primary: #f4f4f4;
  --text-secondary: #c6c6c6;
  --text-tertiary: #8d8d8d;
  --border-color: #393939;
  
  --navbar-bg: #0f0f0f;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ============================================
   Base Styles
   ============================================ */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color var(--transition), color var(--transition);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ============================================
   Navbar Styles
   ============================================ */
.navbar {
  background-color: var(--navbar-bg) !important;
  padding: 0.25rem 0 !important;
  min-height: 56px !important;
  max-height: 56px !important;
  transition: all var(--transition);
  backdrop-filter: blur(10px);
}

.navbar .container-xxl {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

.navbar-brand {
  font-size: 1.125rem !important;
  letter-spacing: -0.5px;
  transition: opacity var(--transition-fast);
  height: 32px !important;
  max-height: 32px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
}

.navbar-brand .text-primary {
  color: var(--primary) !important;
}

.navbar-brand .text-white {
  color: #ffffff !important;
}

.brand-logo svg {
  width: 28px !important;
  height: 28px !important;
}

.navbar-brand:hover {
  opacity: 0.9;
}

.brand-logo {
  color: var(--primary);
  transition: transform var(--transition-fast);
}

.navbar-brand:hover .brand-logo {
  transform: scale(1.05);
}

.nav-link {
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.5rem 1rem !important;
  height: auto !important;
  max-height: 40px !important;
  color: rgba(255, 255, 255, 0.85) !important;
  transition: all var(--transition-fast);
  position: relative;
  border-radius: var(--radius-sm);
  line-height: 1.5;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: all var(--transition-fast);
  transform: translateX(-50%);
}

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

/* Dropdown Menus */
.dropdown-menu {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.25rem !important;
  min-width: 140px !important;
  max-width: 160px !important;
  box-shadow: var(--shadow-lg);
  margin-top: 0.25rem !important;
}

.dropdown-item {
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.6rem !important;
  height: 32px !important;
  max-height: 32px !important;
  font-size: 0.8125rem !important;
  line-height: 1.2 !important;
  transition: all var(--transition-fast);
  display: flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  gap: 0.5rem !important;
}

.dropdown-item svg,
.dropdown-item .lang-flag {
  width: 14px !important;
  height: 14px !important;
  font-size: 0.875rem !important;
  flex-shrink: 0 !important;
}

.dropdown-item:hover {
  background-color: var(--bg-secondary);
  color: var(--primary);
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--primary);
  color: #ffffff;
}

.dropdown-divider {
  border-top-color: var(--border-color);
  margin: 0.5rem 0;
}

/* Dropdown toggles */
.dropdown-toggle::after {
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.6rem !important;
  height: 32px !important;
  max-height: 32px !important;
  font-size: 0.8125rem !important;
  line-height: 1.2 !important;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
}

.btn-sm {
  padding: 0.25rem 0.5rem !important;
  height: 30px !important;
  max-height: 30px !important;
  font-size: 0.75rem !important;
}

/* Button icons */
.btn svg {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0 !important;
}

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 0.25rem 0.5rem !important;
  height: 32px !important;
  max-height: 32px !important;
  font-size: 0.875rem !important;
  line-height: 1.2 !important;
  display: inline-flex !important;
  align-items: center !important;
}

.btn-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Right side navbar actions */
.navbar .d-flex {
  gap: 0.35rem !important;
}

.navbar .vr {
  margin-left: 0.35rem !important;
  margin-right: 0.35rem !important;
  opacity: 0.3 !important;
}

/* Compact language/theme buttons */
.navbar .dropdown > .btn {
  padding: 0.25rem 0.4rem !important;
  min-width: auto !important;
}

/* Hide "Get Started" text on smaller screens */
@media (max-width: 1200px) {
  .navbar .btn-sm span.d-none {
    display: none !important;
  }
}

/* ============================================
   Language & Theme Switcher
   ============================================ */
.lang-flag {
  font-size: 1.125rem;
}

.theme-icon {
  width: 18px;
  height: 18px;
}

/* ============================================
   Vertical Divider
   ============================================ */
.vr {
  background-color: rgba(255, 255, 255, 0.2);
  height: 1.5rem;
}

/* ============================================
   Footer
   ============================================ */
footer {
  background-color: var(--navbar-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer a:hover {
  color: #ffffff !important;
}

/* ============================================
   Dropdown Shadows
   ============================================ */
.shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 992px) {
  .navbar-collapse {
    background-color: var(--navbar-bg);
    padding: 1rem;
    margin-top: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .navbar-nav {
    margin-bottom: 1rem !important;
  }
  
  .nav-link {
    padding: 0.75rem 1rem !important;
    margin-bottom: 0.25rem;
  }
  
  .vr {
    display: none !important;
  }
  
  .navbar-brand {
    font-size: 1.125rem;
  }
}

/* ============================================
   Accessibility
   ============================================ */
.btn:focus,
.nav-link:focus,
.dropdown-item:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn,
  .nav-link {
    border: 2px solid currentColor;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hover-primary:hover {
  color: var(--primary) !important;
}

.bg-primary-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}
