/* Uganda Innovation Portal - Custom Styles */

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 400px;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    border-radius: 12px 12px 0 0;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

/* Statistics Cards */
.stats-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-3px);
}

/* Innovation Grid */
.innovation-card {
    height: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.innovation-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
}

.innovation-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.innovation-card .card-body {
    display: flex;
    flex-direction: column;
}

.innovation-card .card-text {
    flex-grow: 1;
}

/* Pagination */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: 1px solid #e2e8f0;
    color: var(--primary-color);
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    font-weight: 500;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Footer */
footer {
    background-color: var(--dark-color) !important;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 300px;
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .innovation-card .card-img-top {
        height: 150px;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.border-soft {
    border: 1px solid #e2e8f0;
}

.rounded-lg {
    border-radius: 12px;
}

.rounded-xl {
    border-radius: 16px;
}


/* ===== Homepage polish (no functionality changes) ===== */
.homepage { background: #f7f9fc; }

.hero-wrap{
  position: relative;
  background: url('../images/IMG_4445 - Didier Maliki.jpg') center/cover no-repeat;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* ✅ DARK OVERLAY (readability) */
.hero-wrap::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(
    90deg,
    rgba(13, 18, 45, 0.78) 0%,
    rgba(13, 18, 45, 0.65) 55%,
    rgba(13, 18, 45, 0.45) 100%
  );
  z-index: 1;
}

/* ✅ Decorative circle (no override now) */
.hero-wrap::after{
  content:"";
  position:absolute;
  top:-60px;
  right:-60px;
  width: 280px;
  height: 280px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  filter: blur(2px);
  z-index: 1;
}

/* Keep content above overlay */
.hero-wrap > .container{
  position: relative;
  z-index: 2;
}

/* TEXT */
.hero-pill{
  display:inline-flex;
  align-items:center;
  color: rgba(255,255,255,0.95);
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  backdrop-filter: blur(6px);
}

.hero-title{
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.5px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  text-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.hero-subtitle{
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  line-height: 1.6;
  text-shadow: 0 6px 18px rgba(0,0,0,0.5);
}

/* HERO CARD */
.hero-card{
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 16px;
  padding: 18px;
  backdrop-filter: blur(10px);
}

.hero-icon{
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,0.20);
  color: #fff;
  font-size: 1.2rem;
}

.hero-metric{
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 12px;
}

.hero-metric-num{
  color:#fff;
  font-weight:800;
  font-size: 1.2rem;
}

.hero-metric-label{
  color: rgba(255,255,255,0.75);
  font-size: 0.85rem;
}

.search-card{ margin-top: -28px; position: relative; z-index: 2; }

.stat-card{
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 10px 20px rgba(2, 6, 23, 0.06);
    height: 100%;
}
.stat-icon{
    width: 42px;
    height: 42px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius: 12px;
    background: #f3f6ff;
    font-size: 1.1rem;
    margin-bottom: 10px;
}
.stat-num{
    font-weight: 800;
    font-size: 1.6rem;
}
.stat-label{ color: #6b7280; }

.card-hover{
    border-radius: 16px;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}
.card-hover:hover{
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.10) !important;
}

.card .btn-primary{
    border-radius: 10px;
}

.partner-card{
  border-radius: 16px;
}

.partner-logo-wrap{
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 18px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-logo{
  max-height: 70px;
  max-width: 100%;
  object-fit: contain;
  filter: grayscale(10%);
  opacity: 0.95;
  transition: transform .15s ease, opacity .15s ease, filter .15s ease;
}

.partner-logo:hover{
  transform: translateY(-2px);
  opacity: 1;
  filter: grayscale(0%);
}

/* ===== STATS SECTION ===== */
.stats-section{
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.stat-card{
  position: relative;
  background: #ffffff;
  border-radius: 18px;
  padding: 22px;
  border: 1px solid rgba(15,23,42,0.06);
  box-shadow: 0 8px 20px rgba(15,23,42,0.06);
  transition: transform .2s ease, box-shadow .2s ease;
}

.stat-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(15,23,42,0.12);
}

/* Top row */
.stat-top{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

/* Icon badge */
.stat-icon-wrap{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Small badge on the right */
.stat-growth{
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Numbers */
.stat-num{
  font-size: 2.3rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.stat-label{
  font-weight: 700;
  margin-top: 4px;
  color: #0f172a;
}

.stat-sub{
  font-size: .85rem;
  color: #64748b;
  margin-top: 2px;
}

/* Variants */
.stat-card-primary .stat-icon-wrap{
  background: rgba(13,110,253,0.15);
  color: #0d6efd;
}
.stat-card-primary .stat-growth{
  background: rgba(13,110,253,0.12);
  color: #0d6efd;
}

.stat-card-success .stat-icon-wrap{
  background: rgba(25,135,84,0.15);
  color: #198754;
}
.stat-card-success .stat-growth{
  background: rgba(25,135,84,0.12);
  color: #198754;
}

.stat-card-warning .stat-icon-wrap{
  background: rgba(255,193,7,0.2);
  color: #ffc107;
}
.stat-card-warning .stat-growth{
  background: rgba(255,193,7,0.2);
  color: #856404;
}

/* =========================================================
   PORTAL NAVBAR – FINAL POLISH (NAVBAR ONLY)
   ========================================================= */

/* Background & elevation */
.portal-navbar{
  background: linear-gradient(135deg, #0d6efd 0%, #084298 100%);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Brand */
.portal-navbar .navbar-brand{
  font-size: 1.05rem;
  letter-spacing: 0.3px;
}

/* Brand icon */
.brand-icon{
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
}

/* Nav links */
.portal-navbar .nav-link{
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0.75rem;
  transition: color .2s ease, background .2s ease;
}

/* Hover */
.portal-navbar .nav-link:hover{
  color: #ffffff;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
}

/* Active link */
.portal-navbar .nav-link.active{
  color: #ffffff;
}

.portal-navbar .nav-link.active::after{
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: #ffffff;
  border-radius: 3px;
}

/* Spacing between items (desktop only) */
@media (min-width: 992px){
  .portal-navbar .nav-item{
    margin-left: 4px;
    margin-right: 4px;
  }
}

/* CTA buttons */
.portal-navbar .btn-light{
  background: #ffffff;
  color: #0d6efd;
  border: none;
}

.portal-navbar .btn-light:hover{
  background: #e9ecef;
}

.portal-navbar .btn-outline-light{
  border-color: rgba(255,255,255,0.6);
}

.portal-navbar .btn-outline-light:hover{
  background: rgba(255,255,255,0.15);
}

/* User avatar */
.user-avatar{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

/* Dropdown */
.portal-navbar .dropdown-menu{
  border-radius: 12px;
  border: none;
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}

/* Mobile spacing */
@media (max-width: 991px){
  .portal-navbar .navbar-nav{
    gap: 6px;
  }
}
