/* P@SHA Policy Portal - Enhanced Global Styles */
:root {
  --pasha-blue: #1a5276;
  --pasha-blue-light: #2980b9;
  --pasha-blue-dark: #154360;
  --pasha-gold: #f39c12;
  --pasha-gold-light: #f1c40f;
  --pasha-bg: #f8f9fa;
  --pasha-card-bg: #ffffff;
  --pasha-text: #333333;
  --pasha-text-muted: #6c757d;
  --pasha-border: #dee2e6;
  --pasha-sidebar-bg: #f0f4f8;
}

[data-bs-theme="dark"] {
  --pasha-bg: #121212;
  --pasha-card-bg: #1e1e1e;
  --pasha-text: #e0e0e0;
  --pasha-text-muted: #999;
  --pasha-border: #444;
  --pasha-sidebar-bg: #1a1a2e;
}

* { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  scroll-behavior: smooth;
  color: var(--pasha-text);
  background: var(--pasha-bg);
}

/* NAVBAR */
#mainNav {
  background: linear-gradient(135deg, var(--pasha-blue) 0%, var(--pasha-blue-dark) 100%);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

#mainNav .nav-link {
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  transition: color 0.2s;
  font-size: 0.9rem;
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
  color: var(--pasha-gold) !important;
}

#mainNav .navbar-brand {
  font-weight: 700;
  letter-spacing: 0.5px;
}

#mainNav .navbar-brand img {
  height: 36px;
  margin-right: 8px;
}

/* BREADCRUMB */
.breadcrumb-nav {
  background: var(--pasha-sidebar-bg);
  padding: 10px 0;
  font-size: 0.85rem;
}

.breadcrumb-nav .breadcrumb {
  margin: 0;
  background: none;
  padding: 0;
}

.breadcrumb-item a { color: var(--pasha-blue-light); }
.breadcrumb-item.active { color: var(--pasha-text-muted); }

/* HERO */
.hero-section {
  background: linear-gradient(135deg, var(--pasha-blue) 0%, #1b4f72 40%, #2471a3 100%);
  padding: 80px 0 100px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: rgba(243, 156, 18, 0.08);
  border-radius: 50%;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: rgba(41, 128, 185, 0.1);
  border-radius: 50%;
}

.hero-section .container { position: relative; z-index: 1; }

.hero-icon-wrapper {
  font-size: 10rem;
  color: rgba(243, 156, 18, 0.15);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.min-vh-80 { min-height: 70vh; }

/* PAGE HEADER (inner pages) */
.page-header {
  background: linear-gradient(135deg, var(--pasha-blue) 0%, var(--pasha-blue-dark) 100%);
  color: #fff;
  padding: 40px 0 30px;
}

.page-header h1 { font-weight: 700; margin-bottom: 5px; }
.page-header .lead { opacity: 0.85; }

/* FEATURE / SECTION CARDS */
.feature-card {
  border: none;
  border-radius: 12px;
  transition: transform 0.25s, box-shadow 0.25s;
  background: var(--pasha-card-bg);
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12) !important;
}

.feature-card .card-icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  flex-shrink: 0;
}

.feature-card .card-body { padding: 1.5rem; }

/* POLICY DIRECTORY CARDS */
.policy-card {
  border: 1px solid var(--pasha-border);
  border-radius: 12px;
  padding: 1.5rem;
  background: var(--pasha-card-bg);
  transition: all 0.25s;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.policy-card:hover {
  border-color: var(--pasha-blue-light);
  box-shadow: 0 4px 15px rgba(26, 82, 118, 0.1);
}

.policy-card .policy-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--pasha-blue), var(--pasha-blue-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.policy-card h5 { font-weight: 600; margin-bottom: 0.5rem; }
.policy-card p { font-size: 0.9rem; color: var(--pasha-text-muted); flex-grow: 1; }

/* SEARCH */
.search-dropdown {
  position: absolute;
  z-index: 1000;
  width: 100%;
  max-height: 300px;
  overflow-y: auto;
  background: var(--pasha-card-bg);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: none;
}

.search-dropdown.active { display: block; }

.search-item {
  padding: 10px 15px;
  border-bottom: 1px solid var(--pasha-border);
  cursor: pointer;
  transition: background 0.15s;
}

.search-item:hover { background: #f0f8ff; }
[data-bs-theme="dark"] .search-item:hover { background: #2a2a3e; }
.search-item small { color: var(--pasha-text-muted); }

/* CALCULATOR CARDS */
.calculator-card {
  border: none;
  border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
  background: var(--pasha-card-bg);
}

.calculator-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12) !important;
}

.calculator-card .card-header {
  border-radius: 12px 12px 0 0 !important;
  background: linear-gradient(135deg, var(--pasha-blue), var(--pasha-blue-light));
  color: #fff;
}

.result-box {
  background: linear-gradient(135deg, #f8f9fa, #e8f4fd);
  border: 2px solid var(--pasha-blue-light);
  border-radius: 10px;
  padding: 15px;
}

[data-bs-theme="dark"] .result-box {
  background: linear-gradient(135deg, #1e2d3d, #1a2744);
}

.result-box h6 { color: var(--pasha-blue); margin-bottom: 10px; }
.result-box .result-row { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dashed var(--pasha-border); }
.result-box .result-total { font-weight: 700; font-size: 1.1rem; color: var(--pasha-blue); padding-top: 8px; border: none !important; }

/* TABS */
.nav-tabs .nav-link {
  color: var(--pasha-text);
  border: none;
  font-weight: 500;
  padding: 0.75rem 1.25rem;
}

.nav-tabs .nav-link.active {
  color: var(--pasha-blue);
  border-bottom: 3px solid var(--pasha-gold);
  background: var(--pasha-card-bg);
}

/* ACCORDION */
.accordion-button:not(.collapsed) { background: #f8f9fa; color: var(--pasha-blue); font-weight: 600; }
.accordion-button { font-weight: 500; background: var(--pasha-card-bg); }
.accordion-button:focus { box-shadow: 0 0 0 0.2rem rgba(26, 82, 118, 0.25); }

[data-bs-theme="dark"] .accordion-button:not(.collapsed) { background: #2a2a3e; color: var(--pasha-gold); }
[data-bs-theme="dark"] .accordion-button { background: var(--pasha-card-bg); }

/* TABLE OF CONTENTS (sidebar) */
.toc-sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.toc-sidebar .nav-link {
  color: var(--pasha-text-muted);
  font-size: 0.85rem;
  padding: 4px 12px;
  border-left: 2px solid transparent;
  transition: all 0.2s;
}

.toc-sidebar .nav-link:hover,
.toc-sidebar .nav-link.active {
  color: var(--pasha-blue);
  border-left-color: var(--pasha-gold);
  background: rgba(26, 82, 118, 0.05);
}

/* CALLOUT BOXES */
.callout {
  border-left: 4px solid var(--pasha-gold);
  background: #fef9e7;
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 1rem 0;
}

.callout-blue {
  border-left-color: var(--pasha-blue);
  background: #eaf2f8;
}

.callout-danger {
  border-left-color: #e74c3c;
  background: #fdedec;
}

[data-bs-theme="dark"] .callout { background: #2c2518; }
[data-bs-theme="dark"] .callout-blue { background: #1a2744; }
[data-bs-theme="dark"] .callout-danger { background: #2c1818; }

/* BADGES */
.badge { font-weight: 500; }
.badge-federal { background: var(--pasha-blue); }
.badge-provincial { background: #27ae60; }

/* CHECKLIST */
.checklist-item {
  display: flex;
  align-items: flex-start;
  padding: 10px 12px;
  border-bottom: 1px solid var(--pasha-border);
  transition: background 0.2s;
  cursor: pointer;
}

.checklist-item:hover { background: rgba(26, 82, 118, 0.03); }
.checklist-item.checked span.checklist-text { text-decoration: line-through; color: var(--pasha-text-muted); }

.checklist-item input[type="checkbox"] {
  margin-right: 12px;
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--pasha-blue);
  cursor: pointer;
}

.progress-bar-pasha {
  background: linear-gradient(90deg, var(--pasha-blue), var(--pasha-blue-light));
}

/* WHITE PAPER */
.wp-cover {
  background: linear-gradient(135deg, var(--pasha-blue) 0%, #0e3d5c 100%);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}

.wp-cover h1 { font-size: 2.5rem; font-weight: 700; }

.wp-body { max-width: 800px; margin: 0 auto; padding: 40px 20px; }
.wp-body h2 { color: var(--pasha-blue); border-bottom: 2px solid var(--pasha-gold); padding-bottom: 8px; margin-top: 2.5rem; }
.wp-body h3 { color: var(--pasha-blue); margin-top: 1.5rem; }

/* INFOGRAPHIC BARS */
.info-bar {
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

/* SECTION HEADERS */
section h2 { color: var(--pasha-blue); }

/* CARD STYLES */
.card { border-radius: 12px; border-color: var(--pasha-border); background: var(--pasha-card-bg); }
.card-header { border-radius: 12px 12px 0 0 !important; background: var(--pasha-card-bg); }

/* TABLE */
.table { font-size: 0.9rem; }
.table thead th { background: var(--pasha-blue); color: #fff; border-color: var(--pasha-blue-dark); }
.table-striped tbody tr:nth-of-type(odd) { background: rgba(26, 82, 118, 0.03); }

[data-bs-theme="dark"] .table { color: var(--pasha-text); }
[data-bs-theme="dark"] .table-bordered { border-color: #444; }

/* LINKS */
a { color: var(--pasha-blue-light); }
a:hover { color: var(--pasha-gold); }

/* FOOTER */
.site-footer {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: rgba(255,255,255,0.75);
  padding: 40px 0 20px;
}

.site-footer h5 { color: #fff; font-weight: 600; }
.site-footer a { color: rgba(255,255,255,0.7); text-decoration: none; }
.site-footer a:hover { color: var(--pasha-gold); }
.site-footer hr { border-color: rgba(255,255,255,0.1); }

/* DARK MODE OVERRIDES */
[data-bs-theme="dark"] .bg-light { background: #1e1e1e !important; }
[data-bs-theme="dark"] .bg-white { background: var(--pasha-card-bg) !important; }
[data-bs-theme="dark"] .text-dark { color: #e0e0e0 !important; }
[data-bs-theme="dark"] .search-dropdown { background: var(--pasha-card-bg); }
[data-bs-theme="dark"] .page-header { background: linear-gradient(135deg, #0e3d5c 0%, #0a2d45 100%); }
[data-bs-theme="dark"] .info-bar { opacity: 0.9; }
[data-bs-theme="dark"] .table-striped tbody tr:nth-of-type(odd) { background: rgba(255,255,255,0.03); }

/* SCROLLBAR */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--pasha-blue); border-radius: 4px; }

/* PRINT */
@media print {
  .navbar, #hero, .btn, .search-dropdown, .breadcrumb-nav, .no-print, .toc-sidebar, footer { display: none !important; }
  .accordion-collapse { display: block !important; }
  .result-box { border: 1px solid #ccc; }
  section { page-break-inside: avoid; }
  body { font-size: 11px; color: #000; background: #fff; }
  .page-header { background: #1a5276 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .card { border: 1px solid #ccc; box-shadow: none; }
  .table thead th { background: #1a5276 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero-section { padding: 50px 0 60px; }
  .hero-section h1 { font-size: 2rem; }
  .min-vh-80 { min-height: auto; }
  .toc-sidebar { position: static; max-height: none; margin-bottom: 1.5rem; }
  .wp-cover h1 { font-size: 1.8rem; }
}
