/* Make PDCA icon visible in dark mode */
.pdca-icon {
  color: #212529;
}
[data-bs-theme="dark"] .pdca-icon {
  color: #f8f9fa !important;
}
/*
 * Custom CSS for BPMS - Business Process Management System
 */

/* Global Styles */
:root {
  --bs-primary: #0d6efd;
  --bs-info: #0dcaf0;

  /* Hero Section Backgrounds */
  --hero-bg-light: linear-gradient(135deg, #fafdff 60%, #e7f1fa 100%);
  --hero-card-bg-light: #ffffff;

  /* Text Colors */
  --bs-primary-emphasis: var(--bs-primary);
  --bs-body-secondary: #3a3a3a;

  /* --- IMPORTANT: Ensure these are NOT commented out if you use them --- */
  /* --- For the logo, we will apply the filters directly, not via variables here. --- */
  /* --- So, remove the commented out --hero-logo-filter-light line from here. --- */

  /* General project colors (keep if you plan to use them across the app) */
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --info-color: #0dcaf0;
  --light-color: #f8f9fa;
  --dark-color: #212529;
}

/* Custom card styles */
.card {
  transition: box-shadow 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.125);
}

.card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Custom button styles */
.btn {
  font-weight: 500;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

/* Navigation styles */
.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
}

.nav-link {
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar-dark .nav-link:hover {
  color: rgba(255, 255, 255, 0.8) !important;
}

.navbar-dark .nav-link:focus {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Additional navbar improvements */
.navbar {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Footer styles */
footer {
  background-color: var(--light-color);
  border-top: 1px solid rgba(0, 0, 0, 0.125);
  margin-top: 3rem;
}

/* Dark mode adjustments */
[data-bs-theme="dark"] {
  --bs-body-bg: #1a1a1a;
  --bs-body-color: #ffffff;
  --bs-heading-color: #ffffff;

  /* Hero Section Backgrounds for Dark Mode */
  --hero-bg-dark: linear-gradient(135deg, #23272b 60%, #1a1d20 100%);
  --hero-card-bg-dark: #2d2d2d;
  --hero-card-border-dark: #404040;

  /* Text Colors for Dark Mode */
  --bs-primary-emphasis: var(--bs-info);
  --bs-body-secondary: #e0e0e0;

  /* --- IMPORTANT: Ensure this is NOT commented out if you use it --- */
  /* --- For the logo, we will apply the filters directly, not via variables here. --- */
  /* --- So, remove the commented out --hero-logo-filter-dark line from here. --- */
}



[data-bs-theme="dark"] .card {
  background-color: #2d2d2d;
  border-color: #404040;
}

[data-bs-theme="dark"] .navbar-brand {
  color: #ffffff !important;
}

[data-bs-theme="dark"] .text-muted {
  color: #adb5bd !important;
}

[data-bs-theme="dark"] .border {
  border-color: #404040 !important;
}

[data-bs-theme="dark"] footer {
  background-color: #23272b !important;
  color: #adb5bd !important;
  border-top: 1px solid #404040 !important;
}

/* Light mode adjustments */
[data-bs-theme="light"] {
  --bs-body-bg: #ffffff;
  --bs-body-color: #212529;
}

[data-bs-theme="light"] .card {
  background-color: #ffffff;
  border-color: #dee2e6;
}

[data-bs-theme="light"] .navbar-brand {
  color: #ffffff !important;
}

/* Animation classes */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

.slide-up {
  animation: slideUp 0.5s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Icon spacing */
.bi + span, span + .bi {
  margin-left: 0.5rem;
}

/* Custom alerts */
.alert {
  border-radius: 0.5rem;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* --- NEW RULES FOR LANDING PAGE (THIS IS THE BLOCK TO KEEP AND MODIFY) --- */

/* Apply background to the section */
.hero-section {
  background: var(--hero-bg-light);
  min-height: 70vh;
}

[data-bs-theme="dark"] .hero-section {
  background: var(--hero-bg-dark) !important;
}

/* Apply card styles */
.hero-card-inner {
  background: var(--hero-card-bg-light);
  border-color: rgba(0,0,0,0.125);
}

[data-bs-theme="dark"] .hero-card-inner {
  background: var(--hero-card-bg-dark) !important;
  border-color: var(--hero-card-border-dark) !important;
}

/* Text Gradient for BPMS */
.text-gradient {
  background: linear-gradient(90deg, var(--bs-primary), var(--bs-info));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
}

/* --- CORRECTED HERO LOGO STYLING (REPLACE THE EXISTING ONE IN THIS BLOCK) --- */
.hero-logo {
  max-width: 110px;
  /*
    If base logo is WHITE on transparent:
    - In light mode, invert(1) turns it BLACK.
    - Add a subtle drop shadow for light background.
  */
  filter: invert(1) drop-shadow(0 2px 8px rgba(0,0,0,0.10));
}

[data-bs-theme="dark"] .hero-logo {
  /*
    If base logo is WHITE on transparent:
    - In dark mode, remove invert(1) to show original WHITE.
    - Add a subtle drop shadow for dark background.
  */
  filter: drop-shadow(0 2px 8px rgba(255,255,255,0.08));
}
/* --- END CORRECTED HERO LOGO STYLING --- */


/* Animation for button on landing page */
.animate__pulse.animate__infinite {
    animation-duration: 2s;
}

/* Ensure the main content area has a transparent background in the landing page */
.main.container-fluid.py-4 {
    background-color: transparent !important;
}

/* --- Org Chart Specific Styles --- */

/* Base Node Styling */
/* Level-specific background colors for Light Theme */
.level-0 { background-color: #e0f2f7; } /* Light blue */
.level-1 { background-color: #e8f5e9; } /* Light green */
.level-2 { background-color: #fffde7; } /* Light yellow */
.level-3 { background-color: #ffebee; } /* Light red */


/* --- Dark Theme Adjustments for Org Chart --- */
/* Level-specific background colors for Dark Theme */
[data-bs-theme="dark"] .level-0 { background-color: #2c3e50; } /* Dark blue-gray */
[data-bs-theme="dark"] .level-1 { background-color: #305e30; } /* Dark forest green */
[data-bs-theme="dark"] .level-2 { background-color: #5a5a22; } /* Dark olive */
[data-bs-theme="dark"] .level-3 { background-color: #6b2020; } /* Dark maroon */

/* Department Card Header adjustments for theme */
/* Ensure text in card-header remains visible against bg-primary in dark mode */
[data-bs-theme="dark"] .card-header.bg-primary {
    background-color: var(--bs-primary) !important; /* Forces Bootstrap's dark primary */
    color: var(--bs-primary-text-emphasis) !important; /* Ensures readable text */
}

/* Make specific text elements inside the primary card header white */
[data-bs-theme="dark"] .card-header.bg-primary .card-title,
[data-bs-theme="dark"] .card-header.bg-primary .card-text {
    color: var(--bs-light) !important; /* Ensure these are light for visibility */
}

/* Adjust card body background for dark theme to match general body background */
[data-bs-theme="dark"] .card-body {
    background-color: var(--bs-body-bg); /* Use Bootstrap's default dark body background */
}